If a component does not output any content, an unattractive error message appears in the frontend!
But I have a case where it is correct that under certain conditions no output should take place!
If a component does not output any content, an unattractive error message appears in the frontend!
But I have a case where it is correct that under certain conditions no output should take place!
Hi @Regnalf,
Thanks for reaching out.
If any element does not have any content, it will show blank. But in your case, it seems some message has been added on condition when the content is blank. I would suggest you check it once, if that is not the case 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
I use components to display the categories and keywords for a post because I need it in several places.
The components for categories and keywords are contained in these elements:
There are different blocks for the respective categories depending on the type of post.
(Here is the example for categories)
…
Each category block has a condition not to be displayed if no taxonomy is linked.
The categories and keywords are then displayed in the search results. (See structure tree)
If all conditions in the component do not apply, for example a post doesn’t have any categories or keywords, this error message appears. However, as you have described, it should simply remain empty!
The website is still under construction, so it’s not a problem if you try something.
I found the error in your code in
../pro/cornerstone/includes/elements/definitions/component-direct.php
function x_element_render_component
I think this error should either only appear hidden in a debug log, or only with an option in the Cornerstone settings. There are simply cases where it is ok that there is no content!
We’ll look at removing that provided it doesn’t cause other issues. Thanks have a great day.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.