Can't remove hash parameters from legacy-converted-to-multipage app

Hey there,

Before multipage was introduced, I had an app that used hash parameters.
I switched the app to multipage when they were first in beta.

Now I cannot get rid of old hash parameter mappings.

The app's default page is named 'Create':

Here's the "Create" page settings:


There are no hash parameters set.

Here's a snippet of the browser's URL address, with left-over hash parameters:
image

If I create a variable var_test and set its value to "testvalue", then map that as a hash parameter, it'll overwrite the parameter consignee_id with that value:

image

If I then get rid of the mapping, the empty hash parameter returns…
image

None of my JS queries are run on pageLoad, and none of them are setting the URL's hash parameters.

There's a bit of work gone into this app so I won't rebuild it. Can anyone in the Retool team see if there's some left over config in the app?

Thanks

Maybe try duplicating the app? Maybe that might force something to update.

I think this is an old bug with our conversion code—feel free to send me the app JSON and I can clean it up for you at ibork@retool.com!

@Isabella_Borkovic

I am having the same issue too, can you show me how to clean it up myself?
or better to fix this issue!

Hey @CoderNadir - there's not a great way for us to programmatically fix this issue, as it's the result of the one time process that converted single page apps to multi page. The solution is to perform what we refer to as "JSON surgery" - export the app as JSON, open the resulting file in a code editor, manually remove the legacy hash params, and then reimport the edited JSON into Retool.

I don't offhand know exactly which parts need to be edited, but am happy to take care of it for you. Alternatively, feel free to poke around yourself. :+1:

@Darren sounds good, let me see what I can do and will update here once I'll work on this, thank you

What should I search to find the legacy hashParams and how the legacy one looks like?
like are there some prefix/suffix keys to find the hashes?
@Darren / @Isabella_Borkovic

@Darren CC!

Replied in email!

For other people with this same issue, to remove duplicate folders, you can try doing app template surgery and removing duplicate entries like here:

It turns out that the parameters were not actually legacy hash parameters, they were parameters you set yourself on the page plugin!
You can remove them in the IDE:

1 Like

@Isabella_Borkovic

Those are searchParams not hashParams, very clear naming!

in the email I highlighted the hashParams by sharing multiple URLs that each one belongs to a specific page, and in each URL page the same hashes are there again (hashParams) not (searchParams) and even if I removed the (searchParams) as you mentioned above as the solution which is not the solution those (hashParams) will still there :slightly_smiling_face:

Anyways, I solved the issue myself :smiley:, please unmark your post as the solution and I'll share soon how I did it in another post and reply here then we can mark it as the solution as I believe my approach will be much cleaner and definitely will get rid of those hashParams from legacy apps when migrating

Thanks.

I'm interested to see what your solution was, @CoderNadir. Thanks for providing an update. :+1:

1 Like

Ah sorry yes I misunderstood the message!

There are some legacy plugins called $urlFragments that you need to remove from the app JSON in order to fix this issue.

1 Like