VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: hazael on October 21, 2022, 15:26:45 PM

Title: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 21, 2022, 15:26:45 PM
Problem with editing child products. I get an error after editing a product and trying to save it.

Quotekey(): Argument #1 ($array) must be of type array, null given

The problem occurs with PHP 8.x
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 21, 2022, 16:30:41 PM
Do you use the children list in the tab? or of the customfield Multivariant? j3/j4?
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 21, 2022, 16:55:18 PM
Hello Milbo
I just launched my new website with the latest Virtuemart 4.0.7 and joomla 4 as the production version.
https://piekielko.com
I acted a bit like kamikaze ;-)

The website seems to be working fine, but I catch minor bugs while working with it.

The problem with the new Virtuemart is that baby products don't display prices from the parent's product. I chose to add these prices manually to each derivative product.
The error I wrote about occurs only with PHP 8 and j4 - when I try to edit baby products.



Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 21, 2022, 17:05:11 PM
 home page of Virtuemart has some Javascript conflict in the admin panel. Virtuemart's menu is falling apart
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 21, 2022, 17:11:35 PM
Stockable Custom Fields has stopped working in the latest version of Virtuemart. The problem is Javascript errors in Virtuemart
https://breakdesigns.net/extensions/joomla/stockable-custom-fields

Previous versions of VM 4.0.7 did not have this problem and everything worked fine.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 21, 2022, 20:34:10 PM
The prices works for me also in j4. I also have no javascript errors?
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 21, 2022, 21:28:43 PM
It works for you because you are using a new template. Switch to the old default Virtuemart template

Launch the homepage: /administrator/index.php?option=com_virtuemart

And view to the browser console - there are errors.
Generally, due to Javascript errors, plugin: stockable custom fields does not work

PS.
I noticed that I cannot edit chil products only those that I ported over from the old Virtuemart version running on Joomla 3.
I wonder what they are missing?
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 21, 2022, 22:03:48 PM
I get errors like this when I try to add custom fields. All I need to do is click with the mouse on the Virtuemart website (anywhere) and this error appears.
Was there any JQuery modification recently?


Uncaught TypeError: (t.currentItem || t.element).find(...).andSelf is not a function at Object.prepareOffsets (jquery-ui.min.js?vmver=1.9.2:6:42104)
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 22, 2022, 20:07:22 PM
I tried with the old and new admin template and I use in the joomla 4 just the normal joomla template. In j3 I use horme3 or old vmbeez
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Jörgen on October 22, 2022, 23:16:25 PM
I think he is talking about the back end template.

Jörgen
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 23, 2022, 02:31:00 AM
Quote from: Jörgen on October 22, 2022, 23:16:25 PM
I think he is talking about the back end template.
Yes! Of course I'm talking about the backend template. I am showing screenshots from the back office all the time. Some custom field plugins do not work due to javascript errors in VM.
horme3 and vmbeez have nothing to do with it  :)
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 23, 2022, 21:43:29 PM
Quote from: Milbo on October 22, 2022, 20:07:22 PM
I tried with the old and new admin template

I used the last days mainly the old template.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 24, 2022, 16:31:50 PM
I guess I'll go back to the older version with the bad currency conversion. Not even the Virtuemart menu module works in this version...
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 24, 2022, 21:14:43 PM
No one worked on the virtuemart menu module. I think there are some other problems in your installation. Currently you are reporting a lot bugs, which no one else seems to have. The file com_virtuemart.4.0.7.10722_package_or_extract.zip is more than 80 times downloaded already. I doubt that so many people do not notice the problems or do not report it.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 24, 2022, 21:30:46 PM
Quote from: Milbo on October 24, 2022, 21:14:43 PM
I doubt that so many people do not notice the problems or do not report it.
Because not everyone wants to report bugs. There are many who have reported bugs but were mostly ignored or read the annoying answer: "works for me".
Perhaps I will also stop reporting any bug just to make you live in the belief that Virtuemart is perfect because nobody speaks, nobody report...

Maybe I see mistakes only in my country?

Please log in and tell what you see - This is a clean install - there's nothing there.
https://forum.virtuemart.net/index.php?topic=149041.0
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 24, 2022, 21:59:23 PM
And this bug in the new template? no one reported this either - does it mean that everything is fine?
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 26, 2022, 18:53:33 PM
you just have a lot bugs, which I cannot reproduce. and look, I do this here more than 10 years. Check the other threads. If more than one person has the bug, usually people join, but not in your case.

jQuery for example, works in my case with the new template an j4. jQuery is always loaded, so if it is not loaded, the problem is very likely on your end. Or the payment plugin problem, no one else reported it.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 26, 2022, 22:00:15 PM
How many people here have spoken recently?
Recently, I have the impression that I am writing only to myself. From 10/19/2022, (7 days) 100 downloads aren't that much. I myself have downloaded this version at least 10 times...

Here is an evident Bug that I reported. Hardly anyone cares, because not everyone uses these discount rules
https://forum.virtuemart.net/index.php?topic=149031.0

"Partners are our key" - it is a fact or a hoax? What do I have to become for Virtuemart to start functioning realistically? - bronze, silver, platinum? :)
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 26, 2022, 23:10:29 PM
Milbo, probably out of laziness, constantly writes that everything works for him.

I solved the problem with this Virtuemart template for Joomla 4.
Virtuemart uses the verry old version of jquery-ui.min.js v1.9.2 - from 2015 year!

If you have the same problem, download a newer version - the most compatible with Joomla 4 from:
https://jqueryui.com/resources/download/jquery-ui-1.13.2.zip

Replace this file with the newer version and the problem with Javascript functionality in the template will be resolved:
/httpdocs/components/com_virtuemart/assets/jquery-ui.min.js
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 27, 2022, 15:27:31 PM
Yes is resolved in j4 maybe, but not in j3. Vm is anyway loading the jquery of joomla, so talk with them. You posted it yourself

Quote from: hazael on October 26, 2022, 21:39:51 PM
Which Jquery is missing in your opinion?

In J4  is loaded:

media/vendor/jquery/js/jquery.min.js?3.6.0
media/legacy/js/jquery-noconflict.min.js
media/system/js/fields/validate.min.js
media/vendor/chosen/js/chosen.jquery.min.js?1.8.7

In VM is loaded from backend:
administrator/components/com_virtuemart/assets/js/jquery.coookie.js
administrator/components/com_virtuemart/assets/js/vm2admin.js
administrator/templates/vmadmin/html/com_virtuemart/assets/js/vmuikit_vm2admin.js

So the jquery is from Joomla, not by vm. The vm jquery was loaded in j2.5 and can be removed.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 27, 2022, 23:31:59 PM
Quote from: hazael on October 26, 2022, 22:00:15 PM
How many people here have spoken recently?
Recently, I have the impression that I am writing only to myself. From 10/19/2022, (7 days) 100 downloads aren't that much. I myself have downloaded this version at least 10 times...

Here is an evident Bug that I reported. Hardly anyone cares, because not everyone uses these discount rules
https://forum.virtuemart.net/index.php?topic=149031.0

"Partners are our key" - it is a fact or a hoax? What do I have to become for Virtuemart to start functioning realistically? - bronze, silver, platinum? :)

That is on some part true, but there are a lot contacts on other channels, not only on this forum. They get the download directly by messenger. Additionally to that, check the other downloads. It is completly normal that people download a beta / RC to fix their current problem and then they wait for the final release. So the com_virtuemart.4.0.7.10701.zip got downloaded 274 times. the last versions are downloaded around 125 times. So this are at least 15 public testers. My personal guess is 80 people. There are some who download it 10 times as you, but mot people dont do that.

This new version https://dev.virtuemart.net/attachments/1338/com_virtuemart.4.0.7.10730_package_or_extract.zip should be the "final" 4.0.8. The focus is jomla 3 on PHP8, not joomla4. If this version works for j3/PHP8.0 it will be released. But there are a lot fixes for j4 and PHP8.1
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 27, 2022, 23:41:03 PM
Thanks Milbo. Hopefully once Virtuemart gets patched and works well with Joomla 4, it will become popular again as it used to be.


Sorry, forgive me ... I found another BUG  ;D

In Joomla 4 - Sorting  product list in backend SQL Error:

QuoteUnknown column '#_virtuemart_product_manufacturers.virtuemart_manufacturer_id' in 'where clause'
The error will appear if you enter the phrase you are looking for in the form, select the category and select the manufacturer

Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 28, 2022, 00:05:06 AM
This error has nothing todo with j4. It just says that the #_virtuemart_product_manufacturers is not installed correctly. For whatever reason.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 28, 2022, 01:08:17 AM
The tables are correct - the files are original - I haven't modified anything. Overall, everything works for me

It looks a bit like this problem:
https://dba.stackexchange.com/questions/278859/sql-error1054-unknown-column-in-where-clause-when-trying-to-update-column
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 28, 2022, 01:15:33 AM
This is an obvious mistake - it appears on every domain. On joomla 3 and on joomla 4
Test it
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on October 28, 2022, 17:18:19 PM
You checked the wrong table. It is not the manufacturer table, it is the product_manufacturer table. I just tested it on j3 and j4 with selected category and manufacturer, no problem, works.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on October 28, 2022, 19:59:12 PM
Why does everything always work for you? it is unfair  :-\

the table is the same as in the installation.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Darko F. on October 29, 2022, 21:40:50 PM
hazael I will also migrate from J3 to J4
But for do so I made completely fresh installation on test domain of J4 and fresh installation of Virtuemart. I try to upgrade existing one j3 to j4 but I find to many bugs not only with VirtueMart but with other components too.

So I can confirm Milbo send me some versions of VirtueMart trough Skype messenger and most of stuff working on fresh installation.

Is crazy loot of work to migrate all content from J3 (more than 9000 product and all other native joomla articles menues is a pain) to fresh installation of J4. ROCSVI component helps a bit, but I find safer and more stable that way than J3 upgrade.

I didn't publish J4 still is not there jet.
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on November 01, 2022, 18:32:58 PM
I am not sure if it works already for j4, but this migrator works the way you work, Darko. And helps a lot with it https://extensions.virtuemart.net/back-office/import-export/virtuemart-migrator-detail
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on November 02, 2022, 10:46:09 AM
My site https://piekielko.com already officially works with Joomla 4 and Virtuemart 4. This is my first website made in Uikit - In my opinion, better than Bootsrap :)
I just need to work on performance - currently the site is not stored in the cache. The problem is, of course, the basket of products that I need to improve so that it reloads in AJAX. But I'll fix it in my spare time. The current site does a great job with PHP 8.0. I haven't tested it with PHP.8.1 yet
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: hazael on January 13, 2023, 16:13:17 PM
I'm having the same problem again. To save the product I need to downgrade my PHP version from 8 to 7.4

key(): Argument #1 ($array) must be of type array, null given
Title: Re: key(): Argument #1 ($array) must [VM4.0.7] [J4] [PHP 8.x]
Post by: Milbo on January 16, 2023, 14:25:33 PM
Quote from: hazael on November 02, 2022, 10:46:09 AM
My site https://piekielko.com already officially works with Joomla 4 and Virtuemart 4. This is my first website made in Uikit - In my opinion, better than Bootsrap :)
I just need to work on performance - currently the site is not stored in the cache. The problem is, of course, the basket of products that I need to improve so that it reloads in AJAX. But I'll fix it in my spare time. The current site does a great job with PHP 8.0. I haven't tested it with PHP.8.1 yet

The standard core uses ajax, if enabled in VM config