Closed Qoheleth closed 12 years ago
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.
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.
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.
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" notifications@github.com 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/thecity/thecity-plaza-wordpress/issues/13#issuecomment-8149017.
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.
Thanks. I'll take it from here. On Aug 30, 2012 1:24 PM, "Wes Hays" notifications@github.com 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/thecity/thecity-plaza-wordpress/issues/13#issuecomment-8167269.
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('prayers15', 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