Forums

Bug: When having DB Multi Record Loader under Authenticator

rokiii 15 Nov, 2012
My plan was to make sure only registered & higher users could access the list of records from Chronoforms thus having DB Multi Record Loader inside the Authenticator.

At first it bothered me that i couldn't simply move DB Multi Record Loader from outside to inside the authenticator so i've chosen to make one DBLoader inside "Allowed" box inside the Authenticator. The DB Multi Record Loader was being saved there, but none of the elements inside the DB Multi Record Loader (custom code element).
The fields within (inside "On Record Found") are simply empty after saving it.

I've tried with different element and in different browsers, everything is brought back empty after save. The version im having is the latest 4.0 RC3.5.1.

Is there any workaround until the fix comes?

Thank you for fast support.
GreyHead 16 Nov, 2012
Hi rokii,

I don't understand how you have this form set up?

Which events are these actions in - On Load or On Submit?

You do not need to put anything into the On Success event of the Authenticator action. Just redirect unwanted users from the On Fail event. That makes building your form much simpler.

Bob
rokiii 16 Nov, 2012
Just to make it clear i have form set up like this:
On load:
  -> Authenticator
        ->Allowed
              ->DB Multi Record Loader
                     ->On Record Found
                           -> *This is where i want Custom Code for editing, like in the tutorials*
                     ->On Empty Result
                           -> *This is where i want a Custom Code (message), for no results*
        ->Denied
              ->Custom Code (message) saying that access is denied


The problem is that whatever i put inside DB Multi Record Loader (whatever element) it doesn't save it. It seems that you can go only a few (3-levels i think from my case).
So in my case where i used "*" -> where i want to put custom code, the chronoforms simply doesn't save it. I can attach it there, but it doesn't save it and it shows up "On Record Found" empty again - same for "On Empty Result".

If i put DB Multi Record Loader OUT of the Authenticator (so i only have 2 levels deep), then you can save Custom Code normally under "On Record Found or Empty Result"....

(if you're admin please edit my message, to see the \tabs in ->, because forum breaks them)
GreyHead 17 Nov, 2012
Hi rokiii,

OK , thank you. I suggest that you don't nest actions like this. It should work but it doesn't always seem to and most of the time it is not necessary.

I would set it up like this:
-> Authenticator
  ->Allowed
    // leave this empty
  ->Denied
    ->Custom Code (message) saying that access is denied
    ->Show Stopper // to stop further processing (or a redirection action)
->DB Multi Record Loader
  ->On Record Found
    // leave this empty
  ->On Empty Result
    -> *This is where i want a Custom Code (message), for no results*
    -> Event Loop //to reload form
-> *This is where i want Custom Code for editing, like in the tutorials*


Bob

PS There are several ways of handling the On Fail type of event.

Thanks Page plus show stopper will show a message.

Event Loop will re-load the form but will not show a message unless you set one up using some code in the form.

ReDirect User will redirect to another URL. (can be used with ReDirect URL to build a custom URL).

Custom Code can do most things. The Joomla! redirect can be useful as it will also let you display a System Message:
<?php
$mainframe =& JFactory::getApplication();
$mainframe->redirect('some_url', 'some_message');
?>

Bob
This topic is locked and no more replies can be posted.