Internal Bubble Page re-direct

So… this is really hacky - but it works !

What we have is “slug” defined on a thing.

For the moment the slug must be 8 characters long.

So we have the following URL…

https://buildingonbubble.com/version-test/block/testslug

On PageLoad we check to see if Bubble has loaded a thing … if it has we are fine.

Note that you can’t check to see if the Page Thing is empty, you need to check that it has a field that you know should be there.

Now …we also check that if bubble hasn’t loaded a thing, that the last 8 characters of the URL exist on the database against the slug.

If they do exist, then we re-navigate to the page with the matching thing.

What we want to avoid doing is looping bubble on the page loads, as then bad things happen. Hence we must check that the slug exists or we will just go round in a loop.

Also… you can’t debug this, as you then can’t get to the slug name you just get the debug bit.

I actually don’t think we are too far off a less hacky solution, we are just transferring the responsibility of setting the page thing from Bubble to the Programmer. If we could find a way to get the final part of the URL back as an :extract then it would be a lot tidier.

1 Like