templaza / astroid-framework

Powerful framework for designers and developers to create responsive, fast & robust Joomla based websites and templates.
https://astroidframe.work/
GNU General Public License v3.0
86 stars 17 forks source link

Form builder produces "undefined" message when trying to submit a form. #867

Closed felixkat closed 1 week ago

felixkat commented 2 weeks ago

EDIT:- The following diagnosis is when the form widget is launched via Article Layout Builder.

line 25 - $element - Produces expected results when launched via layout.

. . .

Form builder produces "undefined" message when trying to submit a form using the Article Layout Builder.

image

I've only had a brief look, I believe the bug lies within formbuilder/ajax.php

line 25 - $element looks to return false which prevents the if statement to process from line 26.

However, even if processed, line 31 $params, is not going to fetch the correct information.

image

Running latest commit, on Joomla 5.

I don't believe to be a recent issue as it's was mentioned in September

https://github.com/templaza/astroid-framework/discussions/798

felixkat commented 1 week ago

Some progress.

The issue happens using the form widget in Article Layout Builder.

It works fine if using the form widget in a layout.

From what I can see the problem comes from the getElement helper not finding a match for $unqid if coming from Article Layout Builder environment.

sonvnn commented 1 week ago

Thank you I will check and response asap 👍

sonvnn commented 1 week ago

I fixed this issue at https://github.com/templaza/astroid-framework/commit/0a0433a5f54ef7b515bc73c645cc215f303d0134 Please help me download v3-branch and test it. Thanks,

felixkat commented 1 week ago

@sonvnn All working fine, thank you.