[WORKED AROUND TO SOLVE] Form not refreshing as expected

genyded

Active Member
Hi,

On my site, there is a cookie that is read by the template and Fabrik (in form.php for now). This does two things:

1) Toggles the image displayed at the top of the page (nothing to do with Fabrik)
2) Sets (or should set) the row id for a Fabrik form

Initially, it works as expected, but when moving from row to row, the initial form display does not update. If a page refresh is done it will. To see this, you can go to:

http://e-papers.org/vertex/?cid=2 the?cid=2 sets the cookie which is then read to determine the page image display and the Fabrik row to edit when you click on the "Conference Details" menu link below "Conference Chair/Admin". Part of the form edit is the image which is also displayed up top.

Now go to http://e-papers.org/vertex/?cid=4 (from the same page), which will display a different image up top as expected (and SHOULD in the edit form too) then click on the "Conference Details" menu link again and you'll see the row from the previous (row 2) record displayed. The 2 or 4 in the upper left corner of the page is the value retrieved from the cookie. The 2 or 4 in the upper left corner of the FORM is the same (or what SHOULD be the same) read from Fabrik only it does not get updated and neither does the form. These are (or SHOULD) calling the exact same cookie, but Fabrik does not update.

Refresh the PAGE in your browser (or click the menu link again) and you see it updates as expected now. So, it's like there is a cache or something somewhere causing the form not to update on the initial call for some reason. I believe that I have ALL caching disabled though.

I have tried this with base templates with nothing else installed/enabled and in all different browsers and it behaves the same. Also tried Win and Linux - same. J! is 3.3.3 and Fabrik 3.1.1, but tried different combos and the same.

Spent literally days trying to isolate this and it is a must have for my client/boss to approve Fabrik for us on this site, which I am really pushing for because then they will pay for the subscription and I know nothing else can do what Fabrik does in J!-land. Any/all help would be more than appreciated!!!

P.S. The is also an issue with filestat size that may display a warning in the form - I'll look at that later and can work around it for now, but I KNOW it is not the cause of or related to the issue above since I can make it not happen and the other issue persists and happens even without the image (fileupload element) present. If admin creds are needed for anything, please let me know and I'll send them under cover. Right now I have the pieces needed to see this issue set to public access.

Thanks much,
Dale
 
This can be disregarded... I was able to work around it by creating a "special" extra form linked to the same list that has a (onBeforeLoad) PHP plugin with:

PHP:
$app = JFactory::getApplication();
$cookie = $input->cookie;
$input = $app->input;
$myRow = $input->get('rowid');
$cid = $cookie->get($name = 'epcid', $defaultValue = null);
if ($myRow != $cid){
  $app->redirect('index.php?option=com_fabrik&view=form&formid=1&rowid=' . $cid);
}

...in it and that serves the same purpose without causing the initial issue. If I need to add or edit records outside of the "special" url menu links mentioned above... I just just use the regular list/form.
 
  • Like
Reactions: rob
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top