golanlevin
Forum Replies Created
-
Well, I was incorrect. As I’ve moved on to larger sites, I’ve encountered the same problem again. It turns out the the memory limits specified in my php.ini were probably overriding my request in wp-config.php. If anyone else encounters this issue: be sure to check both.
Hi Scott,
I am having exactly the same error as Martin (above) while attempting to archive another one of my WordPress sites. This blog is running WordPress 4.5.3 on a MediaTemple server running PHP 5.5.31 CGI, and Simply Static 1.6.0.
[2016-06-26 20:04:49] Error: (1) Call to a member function find() on a non-object in /nfs/c**/h**/mnt/*****/domains/golancourses.net/html/compform/wp-content/plugins/simply-static/includes/class-simply-static-url-extractor.php on line 191
The following StackOverflow article appears to address the issue, and (if I read this correctly) advises that your code appears to be attempting to “call find() on a model that isn’t loaded in the controller”. https://stackoverflow.com/questions/11474447/error-call-to-a-member-function-find-on-a-non-object-in-cakephp-controller
There appears to be a need for more precise error-checking in the
extract_urls_from_html()
function. For what it’s worth, I attempted to add tests forif (!empty($dom))
at lines 191, 201, and 208. This did have the effect of making the error “go away”, but the zip file that was then generated by the SimplyStatic plugin was almost completely empty! This suggests (per StackOverflow) that something needs to be loaded that currently isn’t. Unfortunately my PHP knowledge is too weak to proceed further.Yours hopefully,
Golan LevinHi, Scott.
I’m delighted to report that I was able to generate an archive of my (v. 4.5.3) WordPress site after (only) following Step 3 of your recommendation, which was to add the following to the wp-config.php file:
define('WP_MEMORY_LIMIT', '64M');
I should mention that, until I followed your suggestion above, the most recent version of Simply Static (1.6.0) produced the same errors as previously, despite your other improvements and bug fixes. So the modification you suggested was definitely necessary. For what it’s worth, my site is hosted on a MediaTemple Grid-Server.
The site I backed up is fairly small, with only 60 pages or so. So it might be worth adding code to check what the users’ PHP memory limit is, and adding in your recommendations to the error reporting.
I didn’t get around to trying to modify the php.ini; that would have been next on my list.
Thanks again for a quality plugin, I’m grateful.
Best wishes,
Golan Levin