Unable to change state in frontend when SEF enabled

More
6 years 4 months ago - 6 years 4 months ago #70887 by yopyop001
Hi,

In front end with SEF url activated, i'm unable to change the state of items (in category or module view)
the template use :
Code:
$statebutton = flexicontent::statebutton(...)

I have a js alert box :

Error status: 404 , Error text: Not Found


In my browser console :
i have the 404 for the file
Code:
https://site.tld/path_1/path_2/index.php?option=com_flexicontent&format=raw&task=setitemstate&id=876&state=-5&lang=

If i disable SEF in Joomla configuration, it's working as excepted.

Regards
Last edit: 6 years 4 months ago by ggppdk.

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

More
6 years 4 months ago #70888 by yopyop001
in components/com_flexicontent/assets/js/stateselector.js

if i change line 42
Code:
script_url: 'index.php?option=com_flexicontent&format=raw',
by
Code:
script_url: '/index.php?option=com_flexicontent&format=raw',

It works in frontend, but it's broken in backend (error 500 Invalid controller)

May be we have to add isAdmin (or not) in flexicontenthtml::statebutton(...) parameters to adapt script url...

Regards

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

More
6 years 4 months ago #70892 by ggppdk
Hello

i think remember a similar fix in the past
then we merge the stateselector JS code and this issue was re-introduced ?

will make the URLs absolute
please open a new issue in github


-- 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...

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

More
6 years 4 months ago #70909 by ggppdk
Hello

i tested will localhost and with flexicontent.org

i cannot confirm the issue

it is working properly
- just the cache is not cleared ...

thus if you refresh the page you will see the old state


-- 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...

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

More
6 years 4 months ago #70911 by ggppdk
Hello

but i do confirm that the URL is relative thus it is wrong

maybe it breaks depending on current menu item

in any case we are need to fix the URL
will do


-- 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...

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

More
6 years 4 months ago - 6 years 4 months ago #70914 by ggppdk
Hello
Code:
$js .= " var fc_root_uri = '" . JUri::root(true) . "'; var fc_base_uri = '" . JUri::base(true) . "'; ... var currentURL = window.location; var live_site = currentURL.protocol + '//' + currentURL.host + fc_base_uri; and then URL will be script_url: live_site + '/index.php?option=com_flexicontent&format=raw',

in
fc_votes.js
fc_favs.js

we use fc_root_uri , but in case of stateselector.js we need fc_base_uri because it is used in both frontend and backend


-- 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...
Last edit: 6 years 4 months ago by ggppdk.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.320 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline