Hi @bjf2000,
Astra is not yet fully compatible with PHP 8.1. I would suggest you to use PHP 7.4.X or PHP 8.0 instead.
Just FYI, even WordPress is not fully compatible with PHP 8.0 or 8.1, as mentioned in this post.
I hope it will help.
Kind regards,
Herman 😊
@bsfherman That article, from the beginning of the year, was regarding 5.9 though. We’re at 6.1 now, and AFAIK it is onboard with PHP through 8.1.
But either way, what do you think is the meaning of the warnings? Normal PHP chatter or important?
Hi @bjf2000,
Could you please let us know the steps to replicate this? So far, the messages we got, it’s just the deprecated warning and doesn’t brake the site.
Looking forward to hearing from you.
Kind regards,
Herman 😊
I didn’t say that it breaks the site, but I haven’t excluded that it actually causes no problems, either, since it’s impossible to test everything. Unlike the developer, I don’t even know what the purpose of the files in question are, so you’re in a much better position to answer the question of relevance.
Even if irrelevant, it’s better to fix a problem than having messages stack up like this in the log (and they definitely are stacking up) indefinitely.
Are you saying that you see the notices too, and is Elementor involved, as seems to be implied based on what I showed? If you’re not even using Elementor on your test site, then we know it’s not. I can’t test without Elementor being there.
Also, to clarify, I wouldn’t necessarily say that these even are deprecation notices in the first place, since the words “PHP Deprecated” are traditionally used for those.
Hi @bjf2000,
Our team is working on the compatibility with PHP 8.1. If you are able to share with us the steps to replicate this, it would be very helpful.
Kind regards,
Herman 😊
AFAIK, it’s simply having PHP 8.1.x.
It would be very helpful on your end if you could tell me whether or not you’re seeing the issue. If you’re not, and as I mentioned, it MAY require having Elementor.
Hi,
I am using PHP 8.1.10 on my local, however, I don’t have any error message in PHP error log. I have Elementor installed and activated too. I am using Laragon for local server. That’s why I asked you the steps to replicate this, in case you are aware of a specific thing you did before you got the error message above.
Kind regards,
Herman 😊
If I figure that out, I’ll post back, but I haven’t yet. It’s something in the ordinary use of the site though: either creating or modifying content. Our people aren’t doing anything beyond that.
I would suggest adding the “Elementor Header & Footer Builder” plugin, since it could definitely be wrapped up in this given its apparent connection with class-astra-target-rules-fields.php.
If possible, you might also update to PHP 8.1.13, which is what we have.
Sorry for the delay.
That would be very helpful if you can help with test case or steps to replicate this.
On my dev site, besides the Elementor, I have the Elementor Header & Footer Builder installed and activated too. The only difference that can be “seen” is only the PHP version that is slightly different version.
Kind regards,
Herman 🙂
And the log is staying empty despite doing ordinary work on the site, like creating a post and modifying one?
There are many changes in each rev of PHP despite the version numbers being close. I do recommend updating to 8.1.13 and then we can go from there.
Hi @bjf2000,
Very old thread I know. However, are you still having the same error in the log, with the latest version of Astra theme, which is v4.1.5?
Please let me know.
Kind regards,
Herman 😊
Thanks for checking back. Everything involved is current (WP, PHP 8.1, Elemantor, Astra), but they’re still occurring, with one difference:
Mentions of these seem to have stopped (it was always flurries of both before):
astra-addon/classes/modules/target-rule/class-astra-target-rules-fields.php
But these continue:
header-footer-elementor/inc/lib/target-rule/class-astra-target-rules-fields.php
I’m not sure why that is, since they occurred at the same times before. It’s not as if they should have had two different causes.
Hi @bjf2000, thank you for the update.
The first one, astra-addon is coming from the Astra Pro plugin. Good to know it is no longer triggering any errors.
For the second one, are you still getting it even only Elementor Header & Footer plugin is the only active plugin?
Kind regards,
Herman 😊
When you say “only active plugin” I’m not sure what you mean. There are numerous active plugins, but perhaps you’re referring to things Elementor, meaning that Elementor Header & Footer is the only thing active from the Elementor family. But that’s not true, since Elementor itself is active; I wasn’t even aware that you could use the Header & Footer one without it.