My app is live in a certain state, and suddenly I’m getting errors on elements that I didn’t touch. I had one before about referencing its own object or something along those lines that I saw a mention of in the forum.
Data source cannot use an element that refers the the current element, in conditions.
That sounds clear, but I have no idea why this is an issue now. It clearly wasn’t before because this is what is now live.
Did something change in the Bubble backend that causes these issues to pop up? I’m also not seeing what the problem is here.
What worked previously was to just clear the dynamic data and redo it, so I’ll try that to see if the error goes away.
Anyone else experiencing this?
EDIT:
I couldn’t redo the data source like this, instead I had to change it to a ‘do search for’ which is unfortunately slower in this case. Very strange that this is now impossible… I just hope this error won’t be popping up in other rg’s with the same setup!
We indeed just pushed an improvement to the issue checker that catches stuff that should have been caught a long time ago. A repeating group data source should not use the same repeating groups list. Fixing this will make your app more reliable and faster.
@emmanuel With the new issue checker, I’m getting an error that was previously causing a bug. This is indeed occurring when I reference the repeating group’s own list as its data source.
What I’m trying to do is sort the repeating group results based on clicking an element - sorting from low to high and vice versa. Is there another way to change the sort order of the same list without changing the actual data source? The reason I built it this way is so that any other parameters already in the data source wouldn’t change when the group is sorted.
Love that this forum is prompt. Nearly lost my mind as I saw new issues w/o having changed anything.
I have a list (repeating group) that is currently being sorted by the content of a dropdown. I’m not sure I understand the workaround. Can someone clarify?
You can just redefine the list as you did in the first place in the data source section of the appearance tab, and the little difference with be the sorting field. This will make display faster (in addition to removing the issues)
I’m all for making my app more reliable and faster, but I do not understand why my initial setup would be a bad choice. Could you elaborate please? Or would I now just be able to remove the condition altogether?
If you define the data source of the repeating group in a condition as the list of the repeating group with a sorting change, for instance, this can lead to an infinite loop, which will make the app non responsive. So instead of doing:
in Appearance - datasource == search for things
in condition - datasource == this repeating group’s list of things:sorted differently
you can do
in Appearance - datasource == search for things
in condition - datasource == search for things:sorted differently
You can use a repeating group’s list of things in other elements, but not in the same element. does that make sense?
Same reason though, it’s because the element is self referential. You’ll need to change the way you’re getting the data source. What worked for me is using a workflow instead of the data source input on the Appearance tab like you have. Good luck!