ajax call from front end

More
10 years 4 months ago #47935 by joomla_user
Hello,

i use ajax calls from backend with folowing url :
index.php?option=com_flexicontent&task=ajax.functionName&format=raw
and i have php page which handles those calls.
Now i have need to make same calls from frontend, but its not working. From what i see its because the user im logged with. If im logged as super user then all works fine but if im not logged its not working.
My guess would be that FC check permissions.
So my question is: is this correct ? How can this be done using the above ajax url?

thanks,

joomla 3.1.5, FC 2.1.0 r1781

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

More
10 years 4 months ago #47936 by ggppdk
Replied by ggppdk on topic ajax call from front end
Hello

why are you using these versions ?

please backup and upgrade to:

J3.3 and FC v2.2.0 r1910:
www.flexicontent.org/forum/index ... =viewtopic


-- also which flexicontent view or task do you want to call ?
have you hacked flexicontent files ? have you created a new view ?


-- 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
10 years 4 months ago #47944 by joomla_user
Thanks for reply

Currently im bound to those versions.

As per documentation this is the way i found to call ajax, using the url (in ajax call) :
site\administrator\index.php?option=com_flexicontent&task=ajax.functionName&format=raw

And creating the file :
site\administrator\components\com_flexicontent\controllers\ajax.raw.php

in which i handle those requests.

Yes i modified some views and some fields but its not suppose to interfere with the flow of FC framework if that what you meant.

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

More
10 years 4 months ago #47950 by ggppdk
Replied by ggppdk on topic ajax call from front end
Hello

joomla_user wrote: And creating the file :
site\administrator\components\com_flexicontent\controllers\ajax.raw.php



1. so your code will handle the calling of the task
is the function (task) inside the controller not called ?


2. if add a
Code:
die("reached");
at the top of the file, you will see if the file gets loaded,



3. finally the calling of the controller task is inside:

admin.flexicontent.php
in flexicontent admin folder so you can do your debugging there too

(you have modified files and you cannot upgrade, it would be better to keep a track of unavoidable and very important changes/hacks and thus be able to upgrade, now you are tied to an old version)

Regards


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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.450 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