[Use category layouts that include the fix] Post-redirect-get pattern

11 months 2 weeks ago - 11 months 2 weeks ago #69803 by ggppdk
Hello

you need to use -recent- v3.0.0+ (or late v2.x) flexicontent category layout of core templates (or a duplication of them)

any templates that do not follow the new-pattern
of course can not benefit from our fix

Test
- with flexicontent core templates
- make sure your page has no JS errors due to 3rd party plugin or due to custom code


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

11 months 2 weeks ago #69809 by jrodgar
Reviewing my old implementation I see that the problem happened on categories, items (both I haven´t checked yet, have yet to test them and try your approach) and the search, where I put it on com_flexicontent/search/default_form.php


You can check yourself on your own site search, I can´t reload the page without being asked to confirm the input

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

10 months 1 week ago #70587 by jrodgar

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

10 months 1 week ago - 10 months 1 week ago #70592 by ggppdk
> You can check yourself on your own site search, I can´t reload the page without being asked to confirm the input

Reload / refresh page ? yes you will be asked by browser to confirm
- the above is normal, try clicking refresh in any website and you will be asked to confirm

"The page has expried" case
- when clicking, forward / backwards browser buttons in search / filtering form
is what is handled


> You can check yourself on your own site search, I can´t reload the page without being asked to confirm the input

I just tested it works "forward / backwards browser buttons" work as intended
no "Page has expired" message

But even if we have somewhere 1 or 2 non-updated old category layouts
- then it is these layouts that need updating

In short there is nothing to fix in our distrubution package

your old layouts do not have this new code
- you will need some custom dev work to update the layouts


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

10 months 1 week ago #70596 by jrodgar
I´ll focus my question in a different way:

why the search page, this one ( www.flexicontent.org/site-search.html?q=...a9f64af0c6bb8f9641c2 ), this form is made through a post method?

Joomla for example, use method get www.joomla.org/search.html?q=test
Google itself, uses method get

You never get there a "confirm resubmision"

It´s not about third party error, neither my template, because I´m using the ones from flexicontent

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

10 months 1 week ago - 10 months 1 week ago #70612 by ggppdk
Hello

i used the URL that you gave, i change some form fields and submitted form

- then i click back,
and there was no message "Page has expired"

so it is working

you can change it to use get
and the form will still submit
but if you do, then you will a very long URL with ALL form fields

[url=http://localhost/joomla3xxdev/?filter=&p=all&filter_170=&filter_2%5B1%5D=&filter_2%5B2%5D=&filter_3=&filter_5=&filter_4%5B1%5D=&filter_4%5B2%5D=&filter_10%5B0%5D=&filter_16=&filter_150%5B1%5D=&filter_150%5B2%5D=&filter_52=&filter_28%5B0%5D=&filter_30=&filter_148=&filter_32%5B0%5D=&filter_33=&filter_37%5B0%5D=&filter_44=&filter_81=&filter_88=&filter_116=&filter_140=&filter_15=&filter_158=&filter_160%5B1%5D=&filter_160%5B2%5D=&limit=5&filter_order=i.title&filter_order_Dir=ASC&option=com_flexicontent&view=category&task=&cid=19&layout=&letter=&listall=0]http://localhost/joomla3xxdev/?filter=&p=all&filter_170=&filter_2%5B1%5D=&filter_2%5B2%5D=&filter_3=&filter_5=&filter_4%5B1%5D=&filter_4%5B2%5D=&filter_10%5B0%5D=&filter_16=&filter_150%5B1%5D=&filter_150%5B2%5D=&filter_52=&filter_28%5B0%5D=&filter_30=&filter_148=&filter_32%5B0%5D=&filter_33=&filter_37%5B0%5D=&filter_44=&filter_81=&filter_88=&filter_116=&filter_140=&filter_15=&filter_158=&filter_160%5B1%5D=&filter_160%5B2%5D=&limit=5&filter_order=i.title&filter_order_Dir=ASC&option=com_flexicontent&view=category&task=&cid=19&layout=&letter=&listall=0[/url]


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

10 months 1 week ago #70613 by ggppdk
Hello

Joomla search form will be submited via POST
and then the search task will redirects (via a GET) to a URL that has only the non empty form fields
then you search more
then you search more

then if you click BACK the POST pages are skipped and you land to URLs created by 'GET'


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

10 months 1 week ago #70614 by jrodgar
I´m missing something, there are no post petitions here ( www.joomla.org/search.html?q=test&Search= ) and the form method is "post"

What are you referring to?

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

10 months 1 week ago #70615 by ggppdk
Hello

i meant the Joomla
com_search component


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

10 months 1 week ago #70616 by ggppdk
Hello

i think we can change it to use

POST - REDIRECT 303 - GET pattern

there should not be any problems with it
all modern browsers handle it correctly

just need to confirm that we will have no problems with joomla caching
- Joomla page cache plugin checks for input method POST and skips caching
so the above is ok

- but our component view caching will need some adjustments regarding "Joomla view caching"

i mean category pages that have search / filter form

i will need to confirm what is needed


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.