Author Topic: 3.2.4 bug in Products module  (Read 219 times)

fr56

  • Beginner
  • *
  • Posts: 4
3.2.4 bug in Products module
« on: November 11, 2017, 20:40:39 pm »
Products module, Layout field. The drop-down box gives three options, but when trying to save with the first option "No override", we get the message "Warning. Field required: Layout", and nothing is saved. The field is also marked with an asterisk (required). This seems like a moot point since the field cannot be left blank in any way.

This used to be ok before (not sure which version, we seldom need to edit this module).

Tested with VM 3.2.2 and 3.2.4, and various versions of Joomla, including 3.8.2.

aftertaf

  • Jr. Member
  • **
  • Posts: 140
    • sO couture
  • VirtueMart Version: 3.2.4
Re: 3.2.4 bug in Products module
« Reply #1 on: November 13, 2017, 23:21:20 pm »
i get warning but it saves
Webmaster for my wife
Long live joomla, virtuemart and open source in general.
usually latest version of VM & J!
Using POSForWebshops, TemplatecreatorCK, MaximenuCK, VM BatchEdit Pro among other things...
VM 3.2.4, PHP Version 7.0.18-1~dotdeb+8.1, mariadb 10.1.22 Joomla! 3.8.1

fr56

  • Beginner
  • *
  • Posts: 4
Re: 3.2.4 bug in Products module
« Reply #2 on: November 14, 2017, 18:20:36 pm »
Thanks for testing.

True, it looks like it's saving. But if you exit the module and re-enter you will see that whatever your changes are, they have not been saved, as long as "No override" is set. You may also check the frontend as well and you will see nothing changes.

aftertaf

  • Jr. Member
  • **
  • Posts: 140
    • sO couture
  • VirtueMart Version: 3.2.4
Re: 3.2.4 bug in Products module
« Reply #3 on: November 14, 2017, 20:17:12 pm »
ah, i dont use the product module anywhere (yet) so cant test on frontend.
seemed like it saved for me though. sorry if i muddied the waters...
Webmaster for my wife
Long live joomla, virtuemart and open source in general.
usually latest version of VM & J!
Using POSForWebshops, TemplatecreatorCK, MaximenuCK, VM BatchEdit Pro among other things...
VM 3.2.4, PHP Version 7.0.18-1~dotdeb+8.1, mariadb 10.1.22 Joomla! 3.8.1

fr56

  • Beginner
  • *
  • Posts: 4
Re: 3.2.4 bug in Products module
« Reply #4 on: November 14, 2017, 21:50:34 pm »
Not at all, you helped clarify the case by pointing out that it may look like the configuration is saved.

If you can try once more in the backend and then possibly confirm the bug.

Create a module and save with Layout=Default. Everything is saved ok. Then set Layout=No override, and maybe change a few other fields as well, and save. You will get the warning. Exit the module and re-enter and what do you see? Has anything been saved?

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2333
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: 3.2.4 bug in Products module
« Reply #5 on: November 15, 2017, 11:12:39 am »
I can reproduce the bug.
This is because the XML require à value, but using "No override" set it to nothing.
A solution is in /modules/mod_virtuemart_product/mod_virtuemart_product.xml to remove required="true" from line
Code: [Select]
        <field
          name="layout"
          type="vmlayout"
          label="MOD_VIRTUEMART_PRODUCT_LAYOUT"
          required="true"
          extension="com_virtuemart"
          view="mod_virtuemart_product"
          description="MOD_VIRTUEMART_PRODUCT_LAYOUT_DESC"
        />
In all case, this is not required, Joomla fallback to default if the layout file is not found.

fr56

  • Beginner
  • *
  • Posts: 4
Re: 3.2.4 bug in Products module
« Reply #6 on: November 15, 2017, 12:52:22 pm »
Thanks, that removes the "required part".
But "No override" isn't what's displayed in the front end even if it's set in the backend, so this needs more fixing.

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2333
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: 3.2.4 bug in Products module
« Reply #7 on: November 15, 2017, 21:53:03 pm »
This fix the bug. as i said, in all case "no overidde" is == to default, because it fallback to default.php layout.
So to say "no overidde" is a stupid for a module layout setting that should not display in the list at all because the logic of joomla is :
 "no overidde"  = empty value, this get never found because .php is not valid and display default.php. so no override need an extra step to get same result as using default