Will Earnhardt
Forum Replies Created
-
Forum: Plugins
In reply to: [Exclude Pages] Plugin Stopped Working?I was experiencing the same issues you all have mentioned…especially the original post by @sagive.
I was able to fix that issue by changing the
ep_set_option()function.I switched out the
add_option()anddelete_option()functions used there forupdate_option()and everything began working again. It seems that for whatever reasondelete_option()was failing, renderingadd_option()to do nothing since the option already had a value.update_option()seems like the better choice here because it will create the new value if it doesn’t exist and update if it already does.I also made some other tweaks to the code, including preventing it from writing revision IDs into the excluded pages array and making the meta box show for all hierarchical post types. Let me know if anyone wants to see those updates.
Forum: Plugins
In reply to: [Advanced Editor Tools] blank inline dialog popupsHmm…I tried the same thing but it doesn’t seem to be working. Modal windows still blank. I see what you mean with the “display: none;” and the untranslated labels.
I’m also curious why that file changed in the latest version anyway. They haven’t updated the changelog, so I’m not sure what was updated.
Ok, disregard my comments above. That was completely incorrect. I do however think I solved the problem now. I was on the right track as far as location of the problem, but off in terms of reason.
The bug showed up for me whenever I had a section expanded, then removed all the children from it. It wanted to stay expanded, but had no children to display. Every time I did that, it would spin forever and not load. I think the if statement on line 740 of the functions.php file that is checking for children to display is the source of the problem.
I’ve modified that if statement and that seems to have fixed it now. There are better ways to do it, but this was a quick and dirty way until the developers can do a better patch.
On line 730, replace this:
"childCount": <?php echo ( isset( $arrChildPages ) ) ? sizeof( $arrChildPages ) : 0 ; ?>,with this:
<?php $childNum = isset( $arrChildPages ) ? sizeof( $arrChildPages ) : 0 ; ?> "childCount": <?php echo $childNum ?>,Then on that line 740 where the if statement is, replace this:
if ($hasChildren && isset($arrOpenChilds) && in_array($onePage->ID, $arrOpenChilds)) {with this:
if ($hasChildren && $childNum > 0 && in_array($onePage->ID, $arrOpenChilds)) {Ah, yes I just got it to break again too. It’s just a curly bracket error on the JSON, so I’ll keep looking at it.
I’ve posted a potential solution to this endless loading problem. Since applying the change, I haven’t had any problems, but I haven’t done much testing.
Check it out if interested.
You may want to check out my post on the similar thread.
I believe I have a temporary fix until the plugin authors can fix the bug.
I think I may have solved the problem. Based on the javascript error, it looks like a misplaced curly bracket. I’ve made the change below and not had the problem since.
In the functions.php file within the plugin directory. You need to move the closing curly bracket on line 737 to after the if statement checking for children.
So from line 737-745…change this:
} <?php // if id is in $arrOpenChilds then also output children on this one if ($hasChildren && isset($arrOpenChilds) && in_array($onePage->ID, $arrOpenChilds)) { ?>, "children": <?php cms_tpv_print_childs($onePage->ID, $view, $arrOpenChilds, $post_type); ?><?php } ?>To this:
<?php // if id is in $arrOpenChilds then also output children on this one if ($hasChildren && isset($arrOpenChilds) && in_array($onePage->ID, $arrOpenChilds)) { ?>, "children": <?php cms_tpv_print_childs($onePage->ID, $view, $arrOpenChilds, $post_type); ?><?php } ?> }Clearing my cache/cookies fixed it momentarily, but the bug would inevitably come back. Since making this change I have not had the bug.
Forum: Fixing WordPress
In reply to: Trailing slash and 301 redirection to https instead of httpDid you ever solve this problem? I’ve recently come across the same issue after a migration to a different infrastructure.