Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdir function error on use #13

Closed
Qoheleth opened this issue Aug 29, 2012 · 6 comments
Closed

mkdir function error on use #13

Qoheleth opened this issue Aug 29, 2012 · 6 comments

Comments

@Qoheleth
Copy link

This is what I get when I try to use the widget on my WordPress site. Any help?

Warning: mkdir() [function.mkdir]: File exists in /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/cachers/file/json_cache.php on line 139

Fatal error: Uncaught exception 'Exception' with message 'Failed to create cache directory' in /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/cachers/file/json_cache.php:140 Stack trace: #0 /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/cachers/file/json_cache.php(51): JsonCache->create_cache_directory_if_needed() #1 /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/loaders/base_loader.php(79): JsonCache->save_data('prayers_15_', NULL) #2 /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/plaza/prayers.php(27): BaseLoader->load_feed() #3 /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/the_city.php(153): Prayers->__construct(Object(PrayersLoader)) #4 /home/disciple/public_html/wp-content/plugins/the-city-plaza/load_data.php(36): TheCity->prayers('15') #5 {main} thrown in /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/cachers/file/json_cache.php on line 140

@weshays
Copy link
Contributor

weshays commented Aug 29, 2012

This looks like it is due to a permissions issue. The current version uses a directory to store data on your server to speed up requests. I worked on moving the cache to the database last night, which I should have done in the first place, and will be releasing an update today.

@Qoheleth
Copy link
Author

Well, now with the update, I'm getting a different error:
Warning: Invalid argument supplied for foreach() in /home/disciple/public_html/wp-content/plugins/the-city-plaza/lib/plaza-php/lib/plaza/prayers.php on line 38
No prayers found
I checked our prayer list on The City. There are prayers there.

@weshays
Copy link
Contributor

weshays commented Aug 30, 2012

I did some more updates and released 0.8.1 which has been caching.

After some other error testing I was able to duplicate your error but only when I put in the wrong subdomain.
If the URL you use to access The City is http://mychurch.onthecity.org then your subdomain is "mychurch" (without the quotes).

Let me know if that helps.

@Qoheleth
Copy link
Author

Aha. That explains it. I had entered the whole url instead of just the
subdomain portion (embarrassing).
It's now showing the list, but there seems to be one more problem with my
understanding: Someone else's prayer list seems to be showing up and, as
you might think, when I click on the links, it can't find the concerns on
our City.
We're dnet.onthecity.org, so I've put in dnet for the subdomain. I've
tried both leaving the group alias blank and filling in our church name
(DisciplesNet Church) with different results, but neither our prayers.
What am I missing?
Thanks so much for your quick responses.
On Aug 30, 2012 12:20 AM, "Wes Hays" [email protected] wrote:

I did some more updates and released 0.8.1 which has been caching.

After some other error testing I was able to duplicate your error but only
when I put in the wrong subdomain.

If the URL you use to access The City is http://mychurch.onthecity.orgthen your subdomain is "mychurch" (without the quotes.

Let me know if that helps.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-8149017.

@weshays
Copy link
Contributor

weshays commented Aug 30, 2012

I looked into this and the problem is not with the plugin. The City has a bad cache that automatically expires after 12 hours. And it is only for certain page numbers.

Shows the bad cache.
http://dnet.onthecity.org/plaza/prayers?format=json&per_page=10

Shows empty - as you would expect.
http://dnet.onthecity.org/plaza/prayers?format=json&per_page=9

If you create a new prayer post it should bust the cache. Then you could always delete it right afterward if you really want to show 10 on a page. Regardless if it still shows up tomorrow I will look into the code on The City side.

@Qoheleth
Copy link
Author

Thanks. I'll take it from here.
On Aug 30, 2012 1:24 PM, "Wes Hays" [email protected] wrote:

I looked into this and the problem is not with the plugin. The City has a
bad cache that automatically expires after 12 hours. And it is only for
certain page numbers.

Shows the bad cache.
http://dnet.onthecity.org/plaza/prayers?format=json&per_page=10

Shows empty - as you would expect.
http://dnet.onthecity.org/plaza/prayers?format=json&per_page=9

If you create a new prayer post it should bust the cache. Then you could
always delete it right afterward if you really want to show 10 on a page.
Regardless if it still shows up tomorrow I will look into the code on The
City side.


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-8167269.

@weshays weshays closed this as completed Aug 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants