mbwebdev
Forum Replies Created
-
I know –_–
Also realized through online searches that other users have the same issue when using the “live preview” mode from WordPress (Appeareance > Themes > then “Live preview” on any deactivated themes).
It throws the same error in my case. Could this be a lead?
see:
https://ww.wp.xz.cn/support/topic/theme-live-preview-not-working-with-release-6-4-1/which links to:
https://core.trac.ww.wp.xz.cn/ticket/59847Well, I downgraded to 6.3.2 and the problem is gone.
It’s probably related to WP Core changes since I did not downgrade your plugin.+ the issue does not appear on WordPress 6.2.3 (from another website I manage)
Notice: Trying to get property ‘content’ of non-object in /home/bafmrqw/www/wp-includes/blocks/template-part.php on line 69
Messing around with a default theme and another one, I got another error. Could it be related to the block/gutenberg system? (I do not use it in my themes).Well, I just tried another way.
I created a blank WP theme (header.php, footer.php, index.php, style.css). Nothing fancy. If I put this theme as the active theme in my WP install and then choose my former one (the more complex one) as a switched theme through Theme Switcha, the header and the footer loaded by Theme Switcha are not the ones from the complex theme but from the public one (as mentionned in another thread).
I do not seem to be alone in this situation and I understand that it’s kind of impossible for you to solve it without any other clue. I try to respect WP standards of coding and I have been developping themes for 10 years.- This reply was modified 2 years, 6 months ago by mbwebdev.
Thanks for the suggestion.
But removing the common functions do not resolve anything, it goes back to the issue described in my second message in this thread:
“There is no fatal error. But the theme is not completely “switched”. It seems that only the theme path is being switched (CSS and JS do change) but the php files from the theme are not in use, you can see it’s the php templates from the public theme.”
Having same name functions in my public/switched themes never raised issues before. I have used your plugin for a couple of years at least, and that never happened. It is kind of normal technically to have the same functions.php for both themes, since one might be doing an upgrade.
I understand that you are having trouble resolving the problem since you cannot replicate it. It is a bug though.Sorry, I meant that there were no error in the debug file when the “Enable in admin area” is not checked.
Here is the error in the debug file when “Enable in admin area” is checked:[27-Nov-2023 11:02:22 UTC] PHP Fatal error: Cannot redeclare disable_wp_crap() (previously declared in /home/bafmrqw/www/wp-content/themes/sista/functions.php:10) in /home/bafmrqw/www/wp-content/themes/sistatwo/functions.php on line 9
[disable_wp_crap() is a function in both of my themes that remove some useless stuff from WP]
The two themes (the public one and the switched one) are in conflict.Thanks for the quick reply.
More infos:
— If “Enable in admin area” is not checked and you activate another theme through Theme Switcha, there is no fatal error. But the theme is not completely “switched”. It seems that only the theme path is being switched (CSS and JS do change) but the php files from the theme are not in use, you can see it’s the php templates from the public theme.
— If “Enable in admin area” is checked and you activate another theme through Theme Switcha, then you have the fatal error. It seems that both themes are activated at the same time since the error is related to the duplicate functions being used at the same time.
I have tried without any plugin activated and the bugs still appear.
Nothing related appears in the debug.log file
Feel free to ask me any question on that matter.Le problème semble être lié à un conflit avec un autre plugin : Kadence WooCommerce Email Designer (+ de 70 000 installs). Il permet de personnaliser l’apparence des emails et est très pratique.
Comme lpc_invoice_generate_action.php utilise wc_get_email_order_items() pour générer le tableau de la facture, il doit y avoir un problème entre les deux plugins.C’était bien entendu un conflit entre les zones et l’offre de Colissimo Signature / Colissimo Expert selon les pays.
Dommage que ce ne soit pas très bien documenté. Je m’étais concentré sur la grille tarifaire du compte La Poste entreprise de mes clients, où des confusions peuvent apparaître ensuite sur WooCommerce à cause des différences entre les zones, Colissimo Europe ou Expert ou Sans signature, etc.