Problem with PHP form plugins not submitting

i can get var_dump output from all the plugins if only the last one has exit; row.
Yes, the LAST one (executed).
If your plugin with the exit is executed before the one without you'll only get the infos from the first one because exit will stop all (and I don't know in which order your plugins are executed)

So you have to try both versions:
plugin1 with var_dump + exit, plugin2 only var_dump
plugin1 only var_dump, plugin2 var_dump + exit

"more specific about point2"
check if '{prefix_tooted_vormiremont___id_raw}' is empty
eg.
Code:
$myid = '{prefix_tooted_vormiremont___id_raw}';
//var_dump($myid);exit //to see what you really get
if ($myid != '')
{
do the query stuff
}
And DON'T return anything which may be FALSE (like the query result) if you don't want to stop form submission
 
Thanks, I'm starting to come to conclusion that I can leave the code out for now as it seems this is not the case, when just pure var_dump also doesn't work. I tried following with just these lines:

$mydata = "plugin1";
var_dump($mydata);

1) Plugin 1 var_dump and exit, plugin 2 only var_dump -> no var_dump output is displayed
2) Plugin 1 only var_dump, plugin 2 var_dump and exit-> var_dump output from plugin 2 is displayed

BR,
Martin
 
I've tested on your site and I can confirm your issue:
plugin1 is not running "on new" if plugin2 is enabled.
No idea why, it's fine on my testsite

But
your form is throwing
Notice: Undefined index: name in /home/flexcom1/public_html/plugins/fabrik_element/fileupload/fileupload.php on line 1765
on add and edit - which I can't replicate on my site.
Are you running a recent complete GitHub update?

Additionally you have 5 JS actions on your id element with condition if this == "" (i.e. if adding a record).
I don't know if this may break anything "on new" in php plugin.
 
Thanks Troester...finally a confirmation that I have not totally lost my mind :):):)

I had gihub from last week, now updated to latest. I also disabled these JS actions on id element. Problem still seems to persist :(
 
I don't have an idea.
But you have a lot of stuff in trash - totally empty elements, id elements, groups...
It seems you have done a lot of testing, maybe moving elements around?

I would backup and then clean up (all list/form/group/element trash), clear Joomla cache, browser cache.
Maybe this will help or at least create some sort of error message.
 
Thanks, deleted all the elements in trash, cleared Joomla and browser cache. Still the same :(
 
Friendly bump :) I need to get the new site up next weekend. This is the only thing that's stopping this :( I will be in a quite big trouble if i can't get this done on deadline.

On my test site you can mess with anything and any way you like.

Thanks!
 
Moved this to pro support.

I can't see what is the reason for your issue.
My thoughts for testing/working around:
- try to disable all elements (but id) and then enable one by one to find the "culprit"
- put your code in one plugin (why do you need 2 plugins onAfter?)
- try with the code in a php file instead of code field
 
Thanks, that seems like a workaround! I see no reason why i wouldn't be able to put the code inside one plugin. I have always used to use separate plugins for separate actions. Just didn't thought of that.

I will try to test disabling elements like you suggested later at night.
 
Hi,

I have tracked down the problem to 3 date elements. If I enable any of them, plugin 1 is not running. If these are disabled, problem seems to be gone. Elements are in form "Vormide remondiregister", no 1161, 1256 and 3165.

I checked all of them and there seems to be nothing wrong with their settings.

BR,
Martin
 
Are you sure 3165 is breaking, too? (it does't have a validation)

Because I can replicate!!

If the date element has
"default to current=no" (and always today=no, I didn't test with yes)
AND notempty validation (but date inserted by the user, no validation error)
then only the last plugin is run "on new" (tested with 3 plugins); with existing records it's ok
 
Workaround (working on my site):
If you add a redirect plugin (maybe any plugin but php) the php plugins are run.
And this is still working if you add
return false;
into redirect plugin condition!

BTW: your other date elements still have the old Fabrik3.0 formatting.
 
Thanks Troester,
Adding non-php plugin seem to work fine for workaround.
I just tested again and also element 3165 breaks the execution of 1st plugin.
Thanks for noticing the old format date settings, will correct these soon.

As this seems to be bug, it is probably best to raise a Github issue and close this thread for now !? :)
 
Keep it open for now - I'm collecting examples of what I think is the same underlying problem we're trying to nail down, where in certain corner cases, the params for plugins get confused, so (say) if you have two PHP plugins, the second one will window up running the code form the first. I think I fixed that particular example of the problem, but only with a bandaid, I don't think i fixed the real underlying problem.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top