Important ComicPress & Easel archive.php bug fix.
The archive.php of easel and comicpress has a serious memory hog issue and with some help from Trump http://goatmouf.net I was able to find it and figure out a fix for it.
Basically what I was doing in the archive.php to find a ‘total count’ of how many finds was to actually do another query and grab the count that way, which essentially just basically doubled the amount of memory used for the finding of information -> BAD frumph BAD.
So in the archive.php find this:
Protect(); $tmp_search = new WP_Query($query_string.'&showposts=-1&posts_per_page=-1'); if (isset($tmp_search->post_count)) { $count = $tmp_search->post_count; } else { $count = "No"; } $tmp_search = null; UnProtect();
or something relatively like that, and comment it out or delete that whole section.
/* Protect(); $tmp_search = new WP_Query($query_string.'&showposts=-1&posts_per_page=-1'); if (isset($tmp_search->post_count)) { $count = $tmp_search->post_count; } else { $count = "No"; } $tmp_search = null; UnProtect(); */
The /* and */ act as “comment everything between this.
Then under that, we need to place
$count = "No";
That would be placed right above the if (have_posts()):
$count = "No"; if (have_posts()) :
Now we still want to “count” the amount of found posts, we need to add the info to get the #
$count = "No"; if (have_posts()) : $count = $wp_query->found_posts;
This will allow the $count to be populated with the correct value of all the posts that were found. Now for the bad news, its not tested with *every* scenario yet, so we cant be totally sure that all counts will be completely 100% accurate, but it will definitely save a ton of memory when someone goes into the archives.
What version of ComicPress are we talking here? Cuz I’m using 2.9 and there’s nothing remotely like that in my archive.php file.
This would be the versions that actually count the amount of results. I took it out in 1-2 versions then put it back in some of the latest.
Is there a version of ComicPress newer than 2.9 I’m not aware of?
Nevermind. Answered my own question with a quick Google search. I didn’t realize that there is now a Comicpress.net out there.
There are other ‘versions’ of comic cms software yes, other then comicpress.
Thanks again Frumph for all your time and help the other day