I didn’t get a screenshot of the warning before accidentally clicking away. I had built out a query joining 9 tables and got the error message that the query was no longer valid. It would be great if, instead of it deleting the entire query, it somehow let me capture what I had done up to that point so I wouldn’t have to start from scratch/memory. (Thank goodness, I had charted it out in a separate doc so it shouldn’t take too long for me to rebuild this time.)
It just dawned on me that if I make changes to my database schema, these complex queries I’m writing might get erased.
That is terrifying.
Here’s what I was implementing that crashed it both times:
INNER JOIN user_metro AS user_metro ON user_metro.metro_id=location.metro_id
I did some experimenting. I think it flagged the query as invalid because:
- Query uses input: user_id
- I join the table user_group on user_group.user_id=input.user_id
- I then tried to join user_metro on user_metro.user_id=user_group.user_id.
That crashed it.
Instead, when I joined user_metro on input.user_id (instead of on another table that used the input), it did not crash.
Not 100% sure this is it, but it wasn’t working with the original configuration, and I’ve got it working with the second configuration.
It just happened again.
I had just done this:
LEFT JOIN User AS User on user.id=user_metro.user_id
This is the same issue as before–I should have joined it on input.user_id.
It might be worth having some kind of flag if someone joins on a property that’s derived from the input. I’m sure I’m not the only one who will try to.
Nope. That wasn’t it.
I’m starting to suspect it’s the number of joins.
Can you guys please help me?
@michael, I might have another clue about this bug. It just happened to me on another query. Instead of re-building the function, I closed the editing window and ran it again. It worked fine.
So I think the error isn’t in a problem with the function stack–I think the error is just getting triggered even though the function is fine.
Can you pass that along to @sean?
Hey Erin… We pushed out the fix just a few minutes before you posted this
I think you were experiencing it running smoothly with the fix. But if you are in Xano make sure to give your browser a refresh just in case, to make sure you’re all up to date.
Enough of my app is functional now that I’m looking at how to optimize speed in some places where my very complex functions are taking ~20 seconds from user tap to data display. For the back end optimization, I was checking to see if removing evals made it any faster, and I got The Error of Death again.
This query took me days to build. And that was weeks ago, so I can’t even remember where to start.
Please, please, please tell me we can restore it somehow. Please.
I’m sorry you ran into this error again! We are looking into it and will let you know as soon as we have an update.
Hi @ErinHWagner your query has been restored! Once again, sorry for the issue.
THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU
I found another circumstance where a query becomes inaccessible because I made changes in the wrong order (in this case, deleting a variable before setting all the joins to point to the new variable).
Note, it might also have been because I deleted a bunch of joined tables to re-order them, but those joins were referenced in the output and I hadn’t yet put the tables back in.
Hi @ErinHWagner can you email or DM me with the browser URL to this endpoint so we can take a look?
Oh, I’ve already edited it. Sorry.
It just happened again. I’ve put a few hours into this query and I don’t have a copy of it anywhere, so it would be worth waiting for you guys to bring it back if you can.
I’ll DM you the link to the function.