In any page, I get PHP warnings when adding a component that is built using 'Raw Content' CS elements

Hey,

In the backend (only), if I add the component to a page I get as many PHP warnings as many ‘Raw Content’ CS elements used in the component. For example, if the component has 6 ‘Raw Content’ CS elements, once I add it to page I get 6 times the same warning, which is:

Warning: : Undefined array key “_builder_atts” in /var/www/vhosts/mydomain.com/dir/wp-content/themes/pro/cornerstone/includes/elements/definitions/raw-content.php on line 58

I have tested it with all the plugins disabled and with several components and pages.

I enclose 2 screenshots:

Thank you

Hi Diego,

Thanks for reaching out.
It might be something with the content added into the Raw Content element you are using in the Component. I would suggest you check the content once. If that does not help, please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi Tristup,

I don’t think it is related to the content added into the Raw Content as I am using different pieces of simple HTML code, e.g., a simple <a> element (anchor link).

I will provide login credentials in a secure note.

Thank you

Hi Diego,

I have checked it and found the problem you described here, and it seems that using the Raw Content element is creating the problem. I would suggest you use the Text element and add the custom HTML code in the HTML tab and check if that resolve your problem. If so, there might be something which is the reason behind the problem. I would like to suggest troubleshooting the following common issue to help us to recognize the reason.

1.Theme Related Issue
2.Plugin Conflict
3.Theme Update related issue
4.Child Theme Related issue
5.CSS/JS Customization
6.Disabling Cache
7.Disabling CDN

If you discover that an issue is coming from a custom code or 3rd party plugin, kindly consult with a developer or contact the plugin author. Please note that we do not provide support for custom codes and 3rd party plugins unless you are subscribed to One. If not subscribed, kindly consult with a developer or contact the plugin author.
Please note that we do not provide support for custom codes and 3rd party plugins unless you are subscribed to the One service.
If none of the above helps, please copy your live site to a staging server so we can troubleshoot freely without breaking your live site.
And give us access to the secure note, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

NOTE: I have checked the same in my local environment, but didn’t replicate the issue.

Thanks

Hi Tristup,

First, it is crucial for me –for all my sites– to be able to use the Raw Content CS element in the components I build. Also, I do not intend to use the Text CS element because it adds HTML element nesting (extra divs) that I do not want in the code output.

Second, I wonder if you have tried to replicate this issue on your side. The point is that, only for testing purposes, I have just set up a new site with no plugins at all, completely blank, with only empty Raw Content CS elements in a component; well, I get the same PHP warnings in the page that has the component added, as the warnings I got in the site I granted you credentials for yesterday.

Up to this point, it is for sure that the problem has nothing to do with custom codes or 3rd party plugins and I think it is very probable that this is caused by a bug. Anyhow, I am providing login credentials in a secure note for this new blank testing site where I have reproduced the issue.

If you are willing to try to replicate it on your side, please, take into account that I have tested it with both PHP versions: 8.1.30 and 8.2.25.

Thank you

Hi Diego,

Sorry for the confusion. I tried it again and was able to replicate the issue in my local environment. I suspect it is a bug in the latest version of Theme. I will report this to our development team for further investigation.
Alternatively, you you can suppress the warning messages by adding the following code into the wp-config.php.

define( 'WP_DEBUG', false );

NOTE: I updated the PHP version in my local to replicate it.

Thanks

Hi Tristup,

I am glad you were able to replicate the issue. Just one note, even with define( 'WP_DEBUG', false ); the warning messages will still persist in the backend.

Thank you

Hi Diego,

Adding the WP_DEBUG value to false, removed the warning messages from everywhere. Not sure why that is not working for you.

Thanks

Hi Tristup,

I am pretty sure that setting the WP_DEBUG value to false is working for you because you probably have in your PHP configuration ( php.ini directives) display_errors set to off (display_errors=0) whereas I have it set to on (display_errors=1).

Thanks

Hey Diego,

I have replicated the issue on my local test server. I will be reporting this to our developers.
At the moment, you do not have to worry about a thing with this issue. This is a PHP Warning which do not affect the element’s functionality.

Please bear with us.

We’ll have a fix in the next release for the warning here. It should only happen inside Cornerstone. Have a great day.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.