Fatal error after update
-
Hi, After updating, the site has been down.
I will downgrade for now.Here are some key word for you.
Fatal error: wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php on line 105
ontent-control/classes/Models/RuleEngine/Query.php(52): ContentControl\Models\RuleEngine\Rule->__construct(Array)
-
@nobo73 Oh no, sorry to hear that, can you tell me what version of WP & PHP you have. We tested v2.0.0 extensively for months, though there are always edge cases we might miss.
If possible can you give me the full error message, that shows only the line, not the reason it errored.
Will get it patched as soon as we determine what went wrong.
- This reply was modified 1 year, 2 months ago by Daniel Iser.
Looking at just the line, is it possible you have another plugin on the site that is adding custom rules to our plugin? If so can you tell me which one so I can test with it.
Seems the issue is from registering rules, which would only throw an error if the rule came from custom code or another plugin doing it some way we weren’t expecting.
Might also be worth testing the plugin with the Health Check plugin’s Troubleshooting mode. It will activate only our plugin temporarily and let you activate others one by one to confirm where the problem is coming from exactly.Hi, Thanks for your rapid response.
I hope you can fix the issue here.
I will chech what plugin is conflicting with it.
The error message I had is here
Before updating database:
Fatal error: Uncaught Exception: Rulecontent_is_page_with_post_tag
not found. in /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php:105 Stack trace: #0 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Query.php(52): ContentControl\Models\RuleEngine\Rule->__construct(Array) #1 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Group.php(53): ContentControl\Models\RuleEngine\Query->__construct(Array) #2 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Query.php(52): ContentControl\Models\RuleEngine\Group->__construct(Array) #3 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/Restriction.php(308): ContentControl\Mod in?/home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php?on line?105After updating the database:
Fatal error: Uncaught Exception: Rulecontent_is_page_with_post_tag
not found. in /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php:105Stack trace: #0 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Query.php(52): ContentControl\Models\RuleEngine\Rule->__construct(Array) #1 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Group.php(53): ContentControl\Models\RuleEngine\Query->__construct(Array) #2 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Query.php(52): ContentControl\Models\RuleEngine\Group->__construct(Array) #3 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/Restriction.php(256): ContentControl\Mod in /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php on line 105
Here are the information about environment:
WordPress Version 6.3.1
PHP version 7.4.33
PHP memory limit 1G
PHP max execution time 180
PHP upload max file size 1G
PHP POST max size 1G
PHP session GC max lifetime 1440
PHP session cookie lifetime 0
PHP mbstring extension On
PHP GD support On
PHP fileinfo extension On
PHP OpenSSL version OpenSSL 1.0.2k 26 Jan 2017Ahh ok that is definitely what it is. I’m gonna patch the code to not throw an error, but to log one instead in the plugin’s settings page which will tell us more about what it is.
Update to v2.0.1 which is available now, then load some front end pages and finally check the plugin’s settings page at the bottom. You should see a list of ERROR: Rule XYZ is not found or similar.@nobo73 Hmm, those appear to be built in conditions, but we thoroughly tested those transitions as we use it for multiple plugins, but maybe we missed something. It was a massive rewrite and its definitely possible.
Give me a few and I’ll see if I can patch that asap for you.Ok very strange, do you happen to know what rule you had before,
page
s don’t usually have tags, and it might have been a bug to allow that in the first place, now it tried to map it to something that doesn’t exist.If you can tell me the use case that enabled tags for pages I’ll see about making that a valid rule type.
One final question, have you already run the “Upgrade” for our plugin’s data?
I need to know if the issue comes from the upgrade, or the code that is in place before you run the upgrades to make sure old rules still applied.Dug through everything:
– It should be noted the only way that rule could have existed previously is if you had modified your post type for pages and added tags. Possible with plugins.
– Is that still the case? Do your pages have tags now?
The rules are generated based on post types and the taxonomy attached to them in WP.
It may be that you previously had that and don’t now, which would allow for that rule to be added to a Restriction, but now isn’t available.
You might just try reviewing those restrictions and making sure your Content conditions are still valid.Keep me posted
Hi, Thanks for your support.
I’m sorry for my delay, I had to play with my kids.Then, I updated. but I still have same fatal error on my site.
The plugin I uses is this :Pages with category and tag, I think this causes the error. I am using it because I want to mark restricted page by tag.
The error message I currently have is as following:
Fatal error: Uncaught Exception: Rulecontent_is_page_with_post_tag
has no callback. in /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php:153 Stack trace: #0 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php(136): ContentControl\Models\RuleEngine\Rule->run_check() #1 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Query.php(100): ContentControl\Models\RuleEngine\Rule->check_rule() #2 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Group.php(71): ContentControl\Models\RuleEngine\Query->check_rules() #3 /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Query.php(102): ContentControl\Models\Rul in /home/minamisawa/jiyu-minamisawa.jp/public_html/test.jiyu-minamisawa.jp/wp-content/plugins/content-control/classes/Models/RuleEngine/Rule.php on line 153and, yes I upgraded database after update.
@nobo73 Fix incoming, that is a different area of the same file, missed it first time. This time I searched all thrown errors and made sure they are either caught or not thrown at all.
v2.0.3 should alleviate that error. I’ll install the other plugin and test to see what I can do about that missing rule.
Update is available
@nobo73 I’ve been unable to replicate the errors on a clean install with that other plugin. The rules do show up properly and seem to work as expected.
– Do you only get errors in the front end, or also in wp-admin?
– Are you able to edit restrictions?
– Once you update and errors are suppressed, do the rules seem to work?
I’m wondering if they registered their changes later than we registered rules for some reason during one of the routines I’m not testing (before upgrading data, during migration).Thank you very much for your support.
Well, this fatal error has gone.
I figured that the error is occur, when I use “page with tag” rule.
However, this “page with tag” rule is not working.
I want to restrict for viweing this page, who are not logged in. but it doesn’t work.
Would you please take a look?@nobo73 – Glad the errors are gone, I’m gonna be logging off for the night (very late here).
If you can follow the guide here, and send a token via the support form I will be happy to check it out tomorrow, otherwise maybe you can fire up one of our demo sites and set up a test there to duplicate the issue and I can investigate.
- The topic ‘Fatal error after update’ is closed to new replies.