News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Call to undefined method Joomla\CMS\Factory::getURI() [solved]

Started by Gomad, July 09, 2022, 02:14:08 AM

Previous topic - Next topic

Gomad

Hello

I do have a fresh pristine installation with Joomla 4.15 using Virtuemart 4.0.6 on PHP 7.4 or PHP 8, multilingual setup (2 languages), at the moment I am testing using the default template cassiopeia and VMbeez3

I created a menu to call the cart, when I click on it I get this error message:
Call to undefined method Joomla\CMS\Factory::getURI()

I have no idea how to fix this

I discovered why... simply until payment method and shipment method is not defined it won't show up...

Thank you

Mike J

Hello Gomad,

I've tried a few clean installs with the versions you're referring too. I was able to add payment and shipping methods in the backend which were visible in the front.

What appears to have cleared up those type of errors (you're reporting) for me was bumping up mysql from 5.x to 8.0.29.

Having said that I'm holding at J 3.10.10 as there is still a problem with J 4.1.5 that breaks the VM cart.

A new VM release won't be far away.  If you need to build now, I'd say go with J 3.10.10 and update to Joomla next once the new VM version is released.
VirtueMart 4.0.2 10661
Joomla! ‎3.10.11
PHP 7.4.30
mysql 5.7.39

Mike J

PS Are you up and running successfully in J 4.1.5 / VM 4.0.6.10690 ?
VirtueMart 4.0.2 10661
Joomla! ‎3.10.11
PHP 7.4.30
mysql 5.7.39

Gomad

Hello

What I meant in my post is that if one tries to display the cart page without having already settled in the configuration at least one category and one product the cart page won't show up at all, in my test the cart page begun to show up only when a category and a product belonging to that category were created.

Later on I found out that this in fact is also specified somewhere in the manual, so it was a normal behaviour.

For what is concerning your last question, nope, I am still trying to figure out why my latest versions available J4 + VM4 test installation does not work well, there are a lot of problems which I am unable to fix.

Yes of course I could use J3 and VM 3 (or maybe VM 4) but I do not trust much the upgrades from multiple major versions to multiple major versions (j3 to j4 + VM3 to VM4 + all extensions for J3 to those for J4.... all at once, sounds alike if something can go wrong maybe will go definitely go wrong.... maybe, just telling...)

I do not want to spend double the time and maybe double the money to first fix a J3+VM3 installation to then get soon the trouble to upgrade to J4+VM4 and re-fix this as well as this "re-fix" can easily happen to be the case, at this point I would like to directly build a working installation with j4 + VM4 + PHP 8 and go for the long run with it.

This seems reasonable if J4 and VM4 are soon fixed to work
If there is still lots of months to wait or even a year or more, then for my personal case I might decide to still prefer to use Thirthy Bees or Prestashop 1.6 (the latter is dead tough, and prestashop 1.7 in my honest opinion is a "born to cause troubles" thing, I really dislike it for a lot of reasons).

Btw, this is very frustrating in general, maybe people think that getting a Joomla version and a VM version (or in general any of these scripts to build e-commerces, e.g TB , PS or others) and have it work properly while respecting all local laws and rules and having a decent set of functionalities is "easy and straightforward", then maybe think that getting back the investment is as easy ....

Well unfortunately none of this is "so easy", truth is that having to continuously run after the new versions, rules, updates, bugs ... it is a real nightmare...
I spoke of the iceberg tip here, in fact the whole thing starts with the server one adopts, with that too a lot of things have to be done to get a decent setup that both secure enough and can support the scripts, so all together the complete operation is in fact a bulky complex job, the investment in time and money is not easy nor little at all and to get a ROI from it is nothing easy IMHO.

So, all what i can do is to thank the developers and hope that there will be soon a version that works out of the box with J4 and PHP8, I have no resources to pay to have VM4 fixed before it naturally happens to work seamlessly out of the box (on j4)

Sincerely even if I would have the money to be spent that way I would prefer to spend it elseway in order to adapt it and perfection it to my specific needs rather than spend money to simply have VM4 just working on J4...

So, I will now try to make a list of all the errors and post it to help and get help, hoping that in this way I can soon proceed having a basic working setup, then I will pay some developer to customize it, for the moment I feel that paying a developer might be just a waste...

Having got the bad experience of prestashop in the past since 1.7 came out I truly would like to start it all over on a new fresh nice page with joomla 4 and Virtuemart 4 on PHP 8, I am guessing this will give me some fresh air for the few next oncoming years at least....

Mike J

Hello Gomad,

Hey, thanks for clarifying that.

If I create a link to shop front / home and publish a single product (without creating or assigning a category) I can get that product to show.

I've got a Joomla 4 template I really want to use so looking forward to J4. I am also planning to build up on a fresh Joomla 4.1.5 install to skip the upgrade if possible (will use jmigrator).

RE: PHP 8, it was suggested that Virtuemart may not be ready for 8 so I rolled back to 7.4.30 but I didn't notice any real difference there.
 
I'd say they'll fix it fairly fast... Weeks not months.

I've been using VM for a decade and can say it's absolutely brilliant. I've gone years and years just cruising along without even hardly thinking about it and it just goes.

I think it's just bad timing right now with this Joomla 4 situation. The VM team releases a stable VM version and Joomla breaks it straight away with an update. Must be very frustrating for the VM team but as you say, get a build-up successfully on J4 and it will be smooth cruising for a number of years.

Anyways, Gomad, it's good to have someone to chat to about these things...
VirtueMart 4.0.2 10661
Joomla! ‎3.10.11
PHP 7.4.30
mysql 5.7.39

Gomad

Hi Mike

Ty for the info

I write an update about what I am doing to find out what is blocking me.

I did run on my server the test script suggested on the joomla forum, it performs an audit and creates a full report about all what is needed to run Joomla spotting out what is missing and/or what is wrong, nothing wrong surfaced.

Therefore in order to have a comparison sure brick to which refer in order to find out what is causing troubles on my server/J4+VM4 installation I decided to create a Joomla 4 website directly on joomla.com, they allow to create a free website using a subdomain, e.g. mywebsite.joomla.com

I did this to be sure to use a joomla 4 installation that is very likely to be a "state of the art" one on a server that is quite surely fully compatible with it.

To start with I noticed that even at joomla.com they use PHP 7.4 and not php 8 yet.

I switched my server to use use PHP 7.4 too so to be able to compare using the same, just to avoid any confusion.

Another thing I noticed right away is that on joomla.com they use Mysql, while on my server i do use MariaDB, but I think that this should not make a difference, in theory at least.

Another thing about the DB is that on joomla.com they use as Database Collation the utf8_general_ci while I used the utf8mb4_general_ci, for this too I think that should not be a cause of problems (while for  Database Connection Collation on joomla.com too they use   utf8mb4_general_ci , same as I did on mine)

Next I installed VM4 on the joomla.com free J4 installation, at least for the very basic main functionalities did work right away out of the box, I can display the category page showing up products, open a product page, choose variations and add the products  to the cart, visit the cart right away clicking on the button go to cart in the confirmation dialog, change the quantities of the products, delete products, see all the calculations properly done....

On the contrary from the step "go to the cart" and beyond on on my server nothing works well, if I add a product to the cart in the confirmation popup dialog clicking go to cart results in getting back to the category page, in order to see the cart I created a menu link to it, in this way the cart is displayed but changing quantities of products and click update cart button results into nothing apparently and the calculations are not carried out, clicking the trash bin icon to delete a product results either into no action or to go back to the category page,

Thus I have now confirmation that those major problems are on my side and not on the VM 4 package itself, however I have bad difficulties into the attempt to find out what is going wrong so far.




Mike J

Hey, thanks for the info on the test script suggested in the Joomla! forum. I'll have a look into that.

RE: MariaDB, when I first started facing problems getting VM running with J! 4, one of the first things I did was roll back from MariaDB to mysql but I didn't notice any real difference there.

Same situation with utf8mb4_general_ci... I went that way too (on a couple of attempts).

RE: "VM4 on the joomla.com free J4 installation", sounds like it was close... But there is a problem with the router in Joomla 4.1.5 + VirtueMart 4.0.6 10690 so I doubt that orders could be successfully processed there if these are the versions you're referring too?

On you own server did you use the same source files used at joomla.com... No non-core plugins or templates installed?
VirtueMart 4.0.2 10661
Joomla! ‎3.10.11
PHP 7.4.30
mysql 5.7.39

Gomad

Hello

The tests I do are carried out in steps, e.g. first I install J4 and test it, then I install virtuemart and test it, then I install other extensions and test it along re-testing each other one already installed before installing another new one....
Until one uses a few extensions this is not so hard to do, however when one is using a lot of extensions it becomes a cumbersome method, but, I know no other way to be sure that every functionality of every extension still works fine as expected after the installation of other extensions.

On joomla.com free host as far as I remember is not possible to chose a build, I think one can only decide between J3 or J4, the build then is automatically given by the server and is the latest official release.
The link to create a website there is this one: https://launch.joomla.org/

As I wrote in my last post trying it on joomla.com VM4 worked fine apparently, so I decided to try to do a new fresh installation onto another server I have, it worked right away on this third server too, finally I came to the conclusion that all the problems I was facing are related to that first particular server I was testing on, which caused a lot of confusion and loss of time.

So far I searched on virtuemart.net but so far I got no hint or clue, I found that "Virtuemart have same technical requirement as Joomla", however on that first server Joomla 4 works just fine and virtuemart 4 not, so I am baffled at the moment....

I still did not investigate deep enough and did not discover why on that first server VM4 does not work, I will get back on that later on.