Joomla 4 - Error with saving module after Joomla Upgrade

Hi,
I upgraded to Joomla 4.0 and upgraded the Carousel Banner to the Joomla 4 Version. Since the upgrade, I have not been able to create a new Carousel Banner module. I am getting the following error below.An error has occurred.

0 Call to a member function test() on bool

Call stack#FunctionLocation1()JROOT/libraries/src/Form/FormField.php:12582Joomla\CMS\Form\FormField->validate()JROOT/libraries/src/Form/Form.php:12293Joomla\CMS\Form\Form->validate()JROOT/libraries/src/MVC/Model/FormModel.php:2194Joomla\CMS\MVC\Model\FormModel->validate()JROOT/administrator/components/com_modules/src/Model/ModuleModel.php:9285Joomla\Component\Modules\Administrator\Model\ModuleModel->validate()JROOT/libraries/src/MVC/Controller/FormController.php:6446Joomla\CMS\MVC\Controller\FormController->save()JROOT/administrator/components/com_modules/src/Controller/ModuleController.php:2507Joomla\Component\Modules\Administrator\Controller\ModuleController->save()JROOT/libraries/src/MVC/Controller/BaseController.php:7308Joomla\CMS\MVC\Controller\BaseController->execute()JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:1469Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()JROOT/libraries/src/Component/ComponentHelper.php:38910Joomla\CMS\Component\ComponentHelper::renderComponent()JROOT/libraries/src/Application/AdministratorApplication.php:14311Joomla\CMS\Application\AdministratorApplication->dispatch()JROOT/libraries/src/Application/AdministratorApplication.php:18612Joomla\CMS\Application\AdministratorApplication->doExecute()JROOT/libraries/src/Application/CMSApplication.php:27813Joomla\CMS\Application\CMSApplication->execute()JROOT/administrator/includes/app.php:6314require_once()JROOT/administrator/index.php:32
Do you have any idea why this might be occuring please?

Thanks,
Kae
 
1 year 1 month ago #1 by Kae Wan
The topic has been marked as resolved.
  • Posted by TemplatePlazza (5195) Offline
Hi Kae,
I think it's because the installed version you have in your installation is still the joomla 3 version of the module. Please re-download and reinstall the joomla 4 version
1 year 1 month ago #2 by TemplatePlazza
The topic has been marked as resolved.
  • Posted by TemplatePlazza (5195) Offline
Sorry I didn't see that you have installed the J 4 version in your previous post. But still I'm unable replicate your problem (please see this video ). The version for Joomla 4 is working properly with me. Can you try re-download and reinstall the module? I have pushed a minor update today.
1 year 1 month ago - 1 year 1 month ago #3 by TemplatePlazza
Last edit: 1 year 1 month ago by TemplatePlazza. Reason: added video link
The topic has been marked as resolved.
Hi.

I tried uninstalling and re-installing with the new version and its still showing the same error.

Would it have anything to do with the database collation?

Here's the Joomla Debug - J! Info tab details below.
=====================Joomla! Version4.0.4PHP Version8.0.28IdentityuserResponse200TemplateatumDatabaseServermysqlVersion10.5.18-MariaDB-0+deb11u1Collationutf8mb4_general_ciConn Collationutf8mb4_general_ci
=====================

Here are the Joomla Debug Request tab details below.
=====================$_GET
array:4 [
  "option" => "com_modules"
  "layout" => "edit"
  "client_id" => "0"
  "id" => "0"
]
$_POST
array:5 [
  "jform" => array:16 [
    "title" => "test"
    "params" => array:26 [
      "target" => "1"
      "count" => "5"
      "cid" => "0"
      "tag_search" => "0"
      "ordering" => "0"
      "column_settings" => "0"
      "num_column" => "1"
      "custom_num_column" => array:5 [
        "__field10" => array:5 [
          "breakpoint" => "320"
          "col" => "1"
          "gutter" => "0"
          "edgepadding" => "0"
          "note" => "For smartphones"
        ]
        "__field11" => array:5 [
          "breakpoint" => "567"
          "col" => "2"
          "gutter" => "5"
          "edgepadding" => "0"
          "note" => "For landscape smartphones"
        ]
        "__field12" => array:5 [
          "breakpoint" => "768"
          "col" => "2"
          "gutter" => "10"
          "edgepadding" => "0"
          "note" => "For tablets"
        ]
        "__field13" => array:5 [
          "breakpoint" => "992"
          "col" => "3"
          "gutter" => "15"
          "edgepadding" => "0"
          "note" => "For desktops"
        ]
        "__field14" => array:5 [
          "breakpoint" => "1200"
          "col" => "4"
          "gutter" => "20"
          "edgepadding" => "0"
          "note" => "For large Desktops"
        ]
      ]
      "autoplay" => "true"
      "autoplay_timeout" => "3000"
      "anim_in" => "tns-fadeIn"
      "anim_out" => "bounceOut"
      "anim_speed" => "1000"
      "gutter_size" => "20"
      "edge_padding" => "0"
      "border_radius" => "0"
      "css_adjustment" => ""
      "layout" => "_:default"
      "moduleclass_sfx" => ""
      "cache" => "1"
      "cache_time" => "900"
      "style" => "0"
      "module_tag" => "div"
      "bootstrap_size" => "0"
      "header_tag" => "h3"
      "header_class" => ""
    ]
    "showtitle" => "1"
    "position" => ""
    "published" => "1"
    "publish_up" => ""
    "publish_down" => ""
    "access" => "1"
    "ordering" => "1"
    "language" => "*"
    "note" => ""
    "assignment" => "0"
    "assigned" => array:52 [
      0 => "159"
      1 => "173"
      2 => "169"
      3 => "170"
      4 => "171"
      5 => "172"
      6 => "174"
      7 => "167"
      8 => "160"
      9 => "177"
      10 => "178"
      11 => "197"
      12 => "179"
      13 => "180"
      14 => "181"
      15 => "198"
      16 => "728"
      17 => "570"
      18 => "150"
      19 => "137"
      20 => "176"
      21 => "183"
      22 => "175"
      23 => "199"
      24 => "168"
      25 => "729"
      26 => "352"
      27 => "353"
      28 => "705"
      29 => "461"
      30 => "611"
      31 => "114"
      32 => "118"
      33 => "119"
      34 => "110"
      35 => "590"
      36 => "354"
      37 => "129"
      38 => "356"
      39 => "462"
      40 => "730"
      41 => "592"
      42 => "726"
      43 => "707"
      44 => "589"
      45 => "426"
      46 => "166"
      47 => "149"
      48 => "374"
      49 => "551"
      50 => "612"
      51 => "668"
    ]
    "rules" => array:4 [
      "core.delete" => array:10 [
        1 => ""
        9 => ""
        6 => ""
        7 => ""
        2 => ""
        3 => ""
        4 => ""
        5 => ""
        10 => ""
        8 => ""
      ]
      "core.edit" => array:10 [
        1 => ""
        9 => ""
        6 => ""
        7 => ""
        2 => ""
        3 => ""
        4 => ""
        5 => ""
        10 => ""
        8 => ""
      ]
      "core.edit.state" => array:10 [
        1 => ""
        9 => ""
        6 => ""
        7 => ""
        2 => ""
        3 => ""
        4 => ""
        5 => ""
        10 => ""
        8 => ""
      ]
      "module.edit.frontend" => array:10 [
        1 => ""
        9 => ""
        6 => ""
        7 => ""
        2 => ""
        3 => ""
        4 => ""
        5 => ""
        10 => ""
        8 => ""
      ]
    ]
    "module" => "mod_carousel_banner"
    "client_id" => "0"
  ]
  "treeselectfilter" => ""
  "task" => "module.apply"
  "return" => ""
  "ea4ac099d1a3d8c2a11c8087b38f42ec" => "1"
]
$_SESSION
array:2 [
  "PHPDEBUGBAR_STACK_DATA" => []
  "joomla" => "TzoyNDoiSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5IjozOntzOjc6IgAqAGRhdGEiO086ODoic3RkQ2xhc3MiOjU6e3M6Nzoic2Vzc2lvbiI7Tzo4OiJzdGRDbGFzcyI6Mzp7czo1OiJ0aW1lciI7Tzo4OiJzdGRDbGFzcyI6Mzp7czo1OiJzdGFydCI7aToxNjc5NjAzMjQ4O3M6NDoibGFzdCI7aToxNjc5NjEwNjAwO3M6Mzoibm93IjtpOjE2Nzk2MTA2MDA7fXM6NzoiY291bnRlciI7aToxMDk7czo1OiJ0b2tlbiI7czozMjoiOTYyYjg2ZTQ1MjQ0MWI5NzNhMDg5MGFlMTIxM2UxOTkiO31zOjg6InJlZ2lzdHJ5IjtPOjI0OiJKb29tbGFcUmVnaXN0cnlcUmVnaXN0cnkiOjM6e3M6NzoiACoAZGF0YSI7Tzo4OiJzdGRDbGFzcyI6NTp7czoxMToiY29tX3NvYmlwcm8iO086ODoic3RkQ2xhc3MiOjM6e3M6MTQ6Im1lc3NhZ2VzLXF1ZXVlIjthOjA6e31zOjg6ImJhY2tfdXJsIjtzOjQzOiIvYWRtaW5pc3RyYXRvci9pbmRleC5waHA/b3B0aW9uPWNvbV9zb2JpcHJvIjtzOjg6InNlY3Rpb25zIjtPOjg6InN0ZENsYXNzIjoxOntzOjU6Im9yZGVyIjtzOjE5OiJmaWVsZCggaWQsIDE3ICkuYXNjIjt9fXM6OToiY29tX21lbnVzIjtPOjg6InN0ZENsYXNzIjoyOntzOjU6Iml0ZW1zIjtPOjg6InN0ZENsYXNzIjo0OntzOjg6Im1lbnV0eXBlIjtzOjg6Im1haW5tZW51IjtzOjQ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YXR1cyI7czowOiIiO3M6OToiY2xpZW50X2lkIjtzOjA6IiI7czo0OiJ0eXBlIjtzOjA6IiI7czo2OiJmb2xkZXIiO3M6MDoiIjtzOjQ6ImNvcmUiO3M6MDoiIjt9czo0OiJsaXN0IjthOjI6e3M6MTI6ImZ1bGxvcmRlcmluZyI7czo4OiJuYW1lIEFTQyI7czo1OiJsaW1pdCI7czoyOiIyMCI7fXM6MTA6ImxpbWl0c3RhcnQiO2k6MDt9czoxMjoicmVkaXJlY3RfdXJsIjtOO31zOjExOiJjb21fbW9kdWxlcyI7Tzo4OiJzdGRDbGFzcyI6Mzp7czo3OiJtb2R1bGVzIjtPOjg6InN0ZENsYXNzIjoxOntzOjk6ImNsaWVudF9pZCI7czoxOiIwIjt9czo0OiJlZGl0IjtPOjg6InN0ZENsYXNzIjoxOntzOjY6Im1vZHVsZSI7Tzo4OiJzdGRDbGFzcyI6MTp7czo0OiJkYXRhIjtOO319czozOiJhZGQiO086ODoic3RkQ2xhc3MiOjE6e3M6NjoibW9kdWxlIjtPOjg6InN0ZENsYXNzIjoyOntzOjEyOiJleHRlbnNpb25faWQiO2k6MTAzOTM7czo2OiJwYXJhbXMiO2E6MDp7fX19fX1zOjE0OiIAKgBpbml0aWFsaXplZCI7YjowO3M6OToic2VwYXJhdG9yIjtzOjE6Ii4iO31zOjQ6InVzZXIiO086MjA6Ikpvb21sYVxDTVNcVXNlclxVc2VyIjoxOntzOjI6ImlkIjtpOjYyO31zOjExOiJhcHBsaWNhdGlvbiI7Tzo4OiJzdGRDbGFzcyI6MTp7czo1OiJxdWV1ZSI7YTowOnt9fXM6ODoib3ZlcnJpZGUiO086ODoic3RkQ2xhc3MiOjA6e319czoxNDoiACoAaW5pdGlhbGl6ZWQiO2I6MDtzOjk6InNlcGFyYXRvciI7czoxOiIuIjt9"
]
=====================
What are your thoughts?
1 year 1 month ago #4 by Kae Wan
The topic has been marked as resolved.
  • Posted by TemplatePlazza (5195) Offline
It looks like you're using the earlier version of joomla 4 (4.0.4) that still has some issues. Please update your Joomla 4 to the latest version first.
1 year 1 month ago #5 by TemplatePlazza
The topic has been marked as resolved.
Hi,

I have upgraded to the latest Joomla 4 version (4.2.9) and the same issue is still occurring.

I have found the actual line of code where it breaks. I tried commenting that line of code and and the form saves fine. Obviously, this is not a permanent fix.

Here is the code that breaks the Carousel Banner form from saving below.
Location: JROOT/libraries/src/Form/FormField.php:1206

Code:
try {
                // Run the field validation rule test.
                $valid = $rule->test($this->element, $value, $group, $input, $this->form);  // This is where the Carousel Banner module save method breaks down.
            } catch (\Exception $e) {
                return $e;
            }

Can you check if there is something that can be rectified in the Carousel Banner module code itself please?

What are your thoughts?

Thanks,
Kae
1 year 3 weeks ago #6 by Kae Wan
The topic has been marked as resolved.
Powered by Kunena Forum