# Issues with unconfigured Slack. New post fails with \`Can not find property 'url' of undefined.\`

**URL:** <https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569>\
**Category:** Developer help\
**Created:** [June 10, 2018, 4:05pm UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569 "2018-06-10T16:05:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronmfparr](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmfparr/32/794_2.png) [@aaronmfparr](https://forum.ghost.org/u/aaronmfparr)\
**Post date:** [June 10, 2018, 4:05pm UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569/1 "2018-06-10T16:05:09Z")

</div>

I solved this one myself, but I don’t understand why it happened, and it might help the team so I am sharing.

**Config:**

- I am self hosting using a vultr VM
- Ubuntu 16.04
- nginx 1.10.3
- Ghost 1.24.1 (production mode)
- MySQL Ver 14.14 Distrib 5.7.22
- using the latest Casper theme

**Background if it matters:**

- I recently upgraded to 1.24.1 from 0.11.
- Fresh install on a new VM.
- Configured nginx myself with my own ssl crt and key
- Exported data from old blog, imported in new.

**Steps that lead to the error**

- Install is done. Website is confirmed up. Ghost is working.
- Ghost Admin: Settings:Apps:Slack is not configured. I am not using it so I left this unconfigured.
- Created a new post using GhostAdmin on a laptop (web browser, normal web app). Edited team member pages. Edited bad markdown on imported posts.
- Everything is fine. All working as expected.
- Using ghost app on android phone: create a new post with an image.
- Post fails to publish but informs me that it saved locally
- Check admin panel via web browser on laptop and confirm that new post is there and unpublished
- I try to publish it there and it fails with that red banner: `Can not find property 'url' of undefined.`
- using ghost-cli I check the logs and see 500 errors on the PUT request for the post.
- `core/server/services/slack.js` is identified in the stack trying to send a ping request.

**How I solved It**

- I insert a `return` at the top of the function `ping(post)` in `core/server/services/slack.js`
- I restart ghost.
- Create post. Publish.
- Success

_My Guess_  
getSlackSettings is returning an undefined object because I did not configure slack.

---

<div class="post-metadata">

**Author:** ![Kate](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kate/32/35_2.png) [@Kate](https://forum.ghost.org/u/Kate)\
**Post date:** [June 11, 2018, 9:11am UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569/2 "2018-06-11T09:11:47Z")

</div>

Hey @aaronmfparr !

Thanks for your report. I can confirm this bug.  
It’s already fixed in master and will be released today or tomorrow in `1.24.2`.

See:

> <https://github.com/TryGhost/Ghost/commit/f943acea58b1840f04081f3ba062bc762b5b744a>
>
> no issue
> 
> \- reported here: https://forum.ghost.org/t/issues-with-unconfigured-sl…ack-new-post-fails-with-can-not-find-property-url-of-undefined/1569
> \- the value of the slack settings was incorrect
> \- introduced in 1.24.1
> \- this adds a protection for invalid slack settings values
> \- this adds the correct code
> \- furthermore: in the next minor we will add a small migration script to correct any affected incorrect slack settings values

Sorry for trouble!

---

<div class="post-metadata">

**Author:** ![aaronmfparr](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmfparr/32/794_2.png) [@aaronmfparr](https://forum.ghost.org/u/aaronmfparr)\
**Post date:** [June 11, 2018, 2:27pm UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569/3 "2018-06-11T14:27:23Z")

</div>

Thank you.

I wonder why this suddenly started happening.

---

<div class="post-metadata">

**Author:** ![Kate](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kate/32/35_2.png) [@Kate](https://forum.ghost.org/u/Kate)\
**Post date:** [June 11, 2018, 4:23pm UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569/4 "2018-06-11T16:23:58Z")

</div>

Can you remember if you made any other changes with the mobile app or the desktop client?  
Other than that, if you don’t mind: could you double check the value of the slack setting in your JSON import file? I noticed that if the slack value get’s set to an empty array, this error occurs. But i was unable to reproduce it.

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![aaronmfparr](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmfparr/32/794_2.png) [@aaronmfparr](https://forum.ghost.org/u/aaronmfparr)\
**Post date:** [June 11, 2018, 4:42pm UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569/5 "2018-06-11T16:42:02Z")

</div>

Before this bug showed up, I didn’t make any changes to the mobile app nor ghost’s code on the server.

I transitioned over to ghost v1 from 0.11 on Friday. Made a test post with success. Then on Saturday tried to post via the mobile app.

---

<div class="post-metadata">

**Author:** ![aaronmfparr](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/aaronmfparr/32/794_2.png) [@aaronmfparr](https://forum.ghost.org/u/aaronmfparr)\
**Post date:** [June 11, 2018, 8:01pm UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569/6 "2018-06-11T20:01:50Z")

</div>

> [@Kate](#):
>
> could you double check the value of the slack setting in your JSON import file?

Sorry for ignoring this. I didn’t save the import file. So I can’t dig into the JSON.

I’m browsing in mysql (command line which I am not good at) …  
app\_settings is empty  
apps is empty  
settings has a line for slack with key ‘slack’ value ‘’

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [June 25, 2018, 8:01pm UTC](https://forum.ghost.org/t/issues-with-unconfigured-slack-new-post-fails-with-can-not-find-property-url-of-undefined/1569/7 "2018-06-25T20:01:53Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
