What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello folks. Sorry for asking a stupid question: Is there some URL GET param filtering/sanitizing in

U01FZHVRE1H
U01FZHVRE1H Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello folks.
Sorry for asking a stupid question: Is there some URL GET param filtering/sanitizing in YVES? I want to pass a custom parameter, but it constantly gets removed on page load.

Comments

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is there some Javascript running on page load removing your param?
    Haven't had issues with custom query params so far...

  • U01FZHVRE1H
    U01FZHVRE1H Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

    I indeed suspect some JS, most probably on form submission.
    When modifying URL in B2C demo shop it’s working as expected. So, looks like some code on our side (that I’m not aware of πŸ˜„).

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    What page is it?

  • U01FZHVRE1H
    U01FZHVRE1H Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

    Catalog page

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet

    Have you checked your browser's network console? can see you see if there is a second page load or redirect?

  • U01FZHVRE1H
    U01FZHVRE1H Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yeah, no redirect or similar!

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited July 2021

    If you suspect it to happen on form submission, have a look at the corresponding controller. Usually, you would make a controller return a redirect after the form has been processed successfully. This is to avoid users resubmitting the form, e. g. by hitting F5.