[BUG]: behavior::framework not found when using custom site view button #1178

Open
opened 2024-10-14 13:49:06 +00:00 by dyvel · 1 comment

What Happened?

HtmlView.php get this code added when a custom button is created for a site view:

// Add the needed Javascript to insure that the buttons work.
Html::_('behavior.framework', true);
$this->getDocument()->addScriptDeclaration("Joomla.submitbutton = function(task){if (task == ''){ return false; } else { Joomla.submitform(task); return true; }}");

I think
Html::_('behavior.framework', true);
Should be changed to
Html::_('jquery.framework', true);

Steps to reproduce the Bug

Create a custom button on a site view. Compile for Joomla 5 and test the view in frontend.

Which Joomla version are you compiling in?

v5.2.0 rc2

Which PHP version are you compiling in?

v8.1

Which Joomla versions are you targeting?

v5

Which PHP version are you targeting?

8.1

Which Web server is JCB running on?

Apache 2.4

Which Relational Database is JCB running on?

MariaDB

Which OS is JCB running on?

Ubuntu 20.04.6

Which JCB version are you using?

5.0.4-alpha3

Where in JCB did this issue occur?

Site View(admin_view)

On which browsers did you encounter the issue?

Safari

Additional Comments

No response

### What Happened? HtmlView.php get this code added when a custom button is created for a site view: ``` // Add the needed Javascript to insure that the buttons work. Html::_('behavior.framework', true); $this->getDocument()->addScriptDeclaration("Joomla.submitbutton = function(task){if (task == ''){ return false; } else { Joomla.submitform(task); return true; }}"); ``` I think `Html::_('behavior.framework', true);` Should be changed to `Html::_('jquery.framework', true);` ### Steps to reproduce the Bug Create a custom button on a site view. Compile for Joomla 5 and test the view in frontend. ### Which Joomla version are you compiling in? v5.2.0 rc2 ### Which PHP version are you compiling in? v8.1 ### Which Joomla versions are you targeting? v5 ### Which PHP version are you targeting? 8.1 ### Which Web server is JCB running on? Apache 2.4 ### Which Relational Database is JCB running on? MariaDB ### Which OS is JCB running on? Ubuntu 20.04.6 ### Which JCB version are you using? 5.0.4-alpha3 ### Where in JCB did this issue occur? Site View(admin_view) ### On which browsers did you encounter the issue? Safari ### Additional Comments _No response_
dyvel added the
Bug
label 2024-10-14 13:49:06 +00:00
Author

The issue is in /libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php on line 5335

The issue is in /libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php on line 5335
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1178
No description provided.