A code review has highlighted that I am echoing the result of a function in:
Template: Service
Element: Basic Text
Settings: get_current_post_parent_id
ID: opjlfs
I have checked the template, but there are no text elements anywhere with this ID. I looked in the database, and I can see it there in the serialized data, but it’s simply not there in the builder. I looked at the parent ID for this phantom element, which is in the builder, but there are no basic text elements within it.
Thinking that there could be a bug here where the data isn’t cleaned up? I thought perhaps it was due to revisions, but I have deleted all those too.
this might be the result of the issue that we had quite a few versions back with disappearing elements.
Can you send the temporary login credentials to your test/staging website and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase, so we can take a look?
Then, I can check this template and see what it’s there.
thank you for the login data. I checked the template, and it’s true, there was an element, that had a parent. But that parent element didn’t have this “phantom” element as a child, and that’s why this happened.
I fixed it by copying the elements, then I removed all, and past them back. This solved the issue.
I’m curious though, do you remember that element, and what you did with it? Did you remove it, or did it just disappear one day?
I can’t reproduce this issue locally, and it would help me to narrow down the issue.
Thank you for taking a look (and so quickly, too).
I remember adding a basic text element with that echo inside a loop because I wanted to debug/see what value was returned. I’m pretty sure I deleted it. Certainly, it was never meant to be kept.
Actually, I still have the database locally with all of the revisions and undo history intact that could be used to figure that out. It looks like I added the text element, then dragged it within a loop, then later deleted it.
Happy to supply the database or access with the history intact.
thank you. If you are sure you deleted it, then that’s all that I need for now. Let’s hope this was a one-in-a-lifetime occurrence, but if it happens again, let me know.
Well, I’ve just run in to a similar issue with the same template. A phantom loop query, containing an {echo} to a function that I have since removed. Somehow the query is still in the template data. This time global elements are in play. I appear to have both the global element and a phantom version of said element with old data. It’s entirely possible that the phantom element before was also inside a global element.
Hh, so, global elements with some {echo:...} functions. I’ll try to reproduce this locally, let’s see.
To temporarily solve this, just copy the top most section, then delete all (with the trash can icon above the elements in the structure panel), and then paste back the section - it should solve it.
I actually tried copying the top most section, deleting all elements and re-pasting, but the issue persisted. What did work was deleting the global element from the template then re-adding it from the list of elements.