VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Milbo on September 06, 2022, 10:32:24 AM

Title: Please test for routing and datefields on j3 and j4
Post by: Milbo on September 06, 2022, 10:32:24 AM
This is a new version, which has a completly new method to merge the Request vars with the router vars. This is necessary for j4, but may also change j3 behaviour. Furthermore the generic setting of task and layout is removed, because it cannot be catched.
In addition, the date fields should now be saved correctly.

Please test https://dev.virtuemart.net/attachments/1327/com_virtuemart.4.0.7.10699.zip
Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on September 07, 2022, 11:00:38 AM
When trying to install / update VM (J.4.2.2):
Undefined constant "VMPATH_LIBS"

This error appeared in PHP 8.0
After change to PHP 7 the installation worked.
Title: Re: Please test for routing and datefields on j3 and j4
Post by: bindcommerce on September 07, 2022, 14:18:23 PM
I think that it solved my problems with the routing. Thank you Milbo!
Title: Re: Please test for routing and datefields on j3 and j4
Post by: Joomill on September 07, 2022, 19:05:08 PM
I have 2 menu-items which displays 2 different categories.

- menu-item 1 works fine.
- The other has ?clearCart=0 in the URL and shows an Assign the component VirtueMart to a menu item error message.

There is a store menu-item for each language present.


Title: Re: Please test for routing and datefields on j3 and j4
Post by: Alexb65 on September 08, 2022, 08:21:16 AM
Hi
Routing seems to work in J 4.2.2 but pagination links are wrong
In category view each pagination button links to the first category page
Title: Re: Please test for routing and datefields on j3 and j4
Post by: Alexb65 on September 08, 2022, 09:30:54 AM
The fix reported here

http://forum.virtuemart.net/index.php?topic=148574.msg530997#msg530997

Fixes pagination
Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on September 08, 2022, 09:52:33 AM
Almost everything works for me now. Both on the page where I use the basic SEF system from Joomla and on another page where I use the 4SEF plugin. :)

With Joomla SEF:

/sef,price/results,19-27
/sef,price/results,10-18?keyword=
/manufacturer/fenix/szeregi/sef,price/results,10-18?keyword=


with 4SEF plugin:

/sklep/bracelets/results73-96
/sklep/earrings/byproduct_sku/results25-48
/sklep/rings/byproduct_name


List of products in HOME page:

There is no reference to "limitstart=0" in the main menu.
Without it, the page will always point to a random pagination page - just like in the attached photo.
This issue occurs if the product listing category is set to the domain start page by default (hompage). Also for this reason, it is impossible to return to the top of the product list using pagination.

Title: Re: Please test for routing and datefields on j3 and j4
Post by: tonis on September 10, 2022, 13:53:38 PM
Hello,
this fixed 2 problems for me

1. problem with breadcrumb path in category without menu item http://forum.virtuemart.net/index.php?topic=148795.msg530918#msg530918

2. and problem with order detail page. The problem was - if there was menu item for the main category, and menu item for orders list, after clicking on some order details, nothing was diplayed. Now ist ok.

Thanks!

The category page pagination problem seems to remain.
Title: Re: Please test for routing and datefields on j3 and j4
Post by: chupi on September 11, 2022, 18:59:34 PM
I just installed version 4.0.7 (compatible J3/J4 bugfix RC) on a test site and the errors that existed with the Joomla router have been corrected when Virtuemart SEO was enabled, no error is shown in the logs of Apache on a site with Joomla 4.2.2 and PHP 8.0.23 . Congratulations to the developer team !!!

But now I have a doubt to see if they can solve it for me. Previously with Joomla 3.10.x the Home in the main menu was defined as

Frontend page
Use with option Vm-Manager activated, or as old Front page (deprecated)
Front-end managing your store. But deprecated to display products, Use 'Category Layout' instead.


  with this URL: index.php?option=com_virtuemart&view=virtuemart

But with Joomla 4 this gives a 404 error. What should we do to display the Virtuemart home page as before?

Thank you
Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on September 12, 2022, 10:56:06 AM
For me (J4.2.2), sorting products based on the choice of the manufacturer's name works terrible and random.
I've tried to solve this with other SEF components, but it often fails with 404 error. Router
in sorting the manufacturer's name it generates an absurd link structure for me.

When I'm on a category page (category name "kolczyki"), its link (no sef) looks like this:
URL with no SEF: /index.php?option=com_virtuemart&view=category&virtuemart_category_id=16&virtuemart_manufacturer_id=0&Itemid=162
URL with joomla SEF: /category-name

One of the links in sorting the manufacturer's name looks like this:
URL with no SEF: /index.php?option=com_virtuemart&view=category&virtuemart_category_id=16&virtuemart_manufacturer_id=5&Itemid=162
URL with joomla SEF: /category-name/producent/manufacturer-name/category-name  (???)

See how it looks in the attachment in the photo.

According to SEO rules, the structure should look like this:
/category-name/producent/manufacturer-name
or
/category-name/manufacturer-name

---------------------------------------

PS. How to disable SEF links in this variable?
$orderByList['manufacturer']
Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on September 12, 2022, 13:45:08 PM
Big Problem with Joomla 3

After updating, I noticed that Virtuemart support was very slow for me.
I noticed a loop in the logs that is overloading my server.

It is impossible to work with VM 4.0.7. I went back to the previous version.
Title: Re: Please test for routing and datefields on j3 and j4
Post by: Darko F. on September 12, 2022, 14:50:30 PM
Hi
J4 and VirtueMart 4.0.7 10699.

When I press Joomla menu link with alias Shop with top category i get

/shop?clearCart=0  <!-- maybe is that default behaviour I don't know -->

This update fix breadcrumbs for categories without Joomla menus.

Pagination still don't work no Mather what page number I click all have the same /(this-category)?clearCart=0 link

When I try to edit product from front page I get
my site/en/?option=com_virtuemart&tmpl=component&manage=1&view=product&task=edit&virtuemart_product_id=576
And error 0
If difficulties persist, please contact the website administrator and report the error below.
0 Call to undefined method Joomla\CMS\Router\SiteRouter::setMode()
The same error I get when i press PDF icons or email icons

Hope this help.

Regards.


Title: Re: Please test for routing and datefields on j3 and j4
Post by: scriner on September 13, 2022, 07:22:04 AM
Hello,

This update solved my problem with routing https://forum.virtuemart.net/index.php?topic=148714.0 (https://forum.virtuemart.net/index.php?topic=148714.0). But I already restored website to J3 because there was many other problems.

But other problem with ?clearCart didn't solved. Why this tale - ?clearCart needed at all?

And I have problem with notify function, after I entered email and press button it shows message that "Notify successfully saved" and "vmTable store insertObject" but in fact, no notify email saved. Anybody has same issue?

J 4.2.2 / VM 4.0.7 10701
Title: Re: Please test for routing and datefields on j3 and j4
Post by: scriner on September 16, 2022, 06:27:31 AM
Quote from: hazael on September 12, 2022, 13:45:08 PM
Big Problem with Joomla 3

After updating, I noticed that Virtuemart support was very slow for me.
I noticed a loop in the logs that is overloading my server.

It is impossible to work with VM 4.0.7. I went back to the previous version.

I have same, but with J 4.2.2 and VM 4.0.7 10701

When I trying to save product, I get 508 error and mod_hostinglimits stops me.

[host website.kz] Error on sending request(GET /administrator/index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id[]=2&_=1663301629449 HTTP/1.0); uri(/administrator/index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id[]=2&_=1663301629449) content-length(0): ReceiveAckHdr: nothing to read from backend (LVE ID 10130), check http://docs.cloudlinux.com/mod_lsapi_troubleshooting.html, referer: https://website.kz/administrator/index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id[]=2




Title: Re: Please test for routing and datefields on j3 and j4
Post by: kiro789 on September 28, 2022, 15:48:28 PM
0 Call to undefined method Joomla\CMS\Router\SiteRouter::setMode()
I have this error now on the site
Title: Re: Please test for routing and datefields on j3 and j4
Post by: Darko F. on September 29, 2022, 13:18:46 PM
Hi,
I install on test site your package  com_virtuemart.4.0.7.10711_package_or_extract.zip
Joomla 4

And categories lost picture when I try to enter categories back end I get

An error has occurred.
0 Call to undefined method VmMedia::addMediaAttributesByType()
Call stack
#   Function   Location
1   ()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/sublayouts/images.php:193
2   include()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/helpers/adminsublayouts.php:64
3   adminSublayouts::renderAdminVmSubLayout()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/helpers/vmuikit_mediahandler.php:60
4   VmuikitMediaHandler::displayFilesHandler()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/product/product_edit_images.php:35
5   include()   JROOT/libraries/src/MVC/View/HtmlView.php:410
6   Joomla\CMS\MVC\View\HtmlView->loadTemplate()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/sublayouts/buildtabs.php:63
7   include()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/helpers/adminsublayouts.php:64
8   adminSublayouts::renderAdminVmSubLayout()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/helpers/vmuikit_adminuihelper.php:253
9   vmuikitAdminUIHelper::buildTabs()   JROOT/administrator/templates/vmadmin/html/com_virtuemart/product/product_edit.php:52
10   include()   JROOT/libraries/src/MVC/View/HtmlView.php:410
11   Joomla\CMS\MVC\View\HtmlView->loadTemplate()   JROOT/administrator/components/com_virtuemart/helpers/vmviewadmin.php:75
12   VmViewAdmin->display()   JROOT/administrator/components/com_virtuemart/views/product/view.html.php:587
13   VirtuemartViewProduct->display()   JROOT/administrator/components/com_virtuemart/helpers/vmcontroller.php:121
14   VmController->display()   JROOT/administrator/components/com_virtuemart/helpers/vmcontroller.php:146
15   VmController->edit()   JROOT/administrator/components/com_virtuemart/controllers/product.php:46
16   VirtuemartControllerProduct->edit()   JROOT/libraries/src/MVC/Controller/BaseController.php:672
17   Joomla\CMS\MVC\Controller\BaseController->execute()   JROOT/administrator/components/com_virtuemart/virtuemart.php:75
18   require_once()   JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
19   Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()   JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
20   Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()   JROOT/libraries/src/Component/ComponentHelper.php:355
21   Joomla\CMS\Component\ComponentHelper::renderComponent()   JROOT/libraries/src/Application/AdministratorApplication.php:143
22   Joomla\CMS\Application\AdministratorApplication->dispatch()   JROOT/libraries/src/Application/AdministratorApplication.php:186
23   Joomla\CMS\Application\AdministratorApplication->doExecute()   JROOT/libraries/src/Application/CMSApplication.php:294
24   Joomla\CMS\Application\CMSApplication->execute()   JROOT/administrator/includes/app.php:61
25   require_once()   JROOT/administrator/index.php:32

Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on September 29, 2022, 14:01:34 PM
Undefined constant "VMPATH_ADMIN"

Quote500 POST /administrator/index.php?option=com_installer&view=install HTTP/1.0

Still unresolved problem with installing on a server with supported PHP 8. Can only be installed on PHP 7
Title: Re: Please test for routing and datefields on j3 and j4
Post by: Darko F. on September 29, 2022, 20:38:24 PM
So I made clean install, I even create database and Joomla 4 install just to be sure  then I install install on test site your package  com_virtuemart.4.0.7.10711_package_or_extract.zip
And when I create category worked well save category as should. But then I upload picture to category picture.png and this brake page, I upload one more in new category .jpg and this also brake page.
Is a bug I think :)
I make another topic with this, here https://forum.virtuemart.net/index.php?topic=148918.0

An error has occurred.
0 Call to undefined method VmMedia::addMediaAttributesByType()
Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on September 29, 2022, 22:18:35 PM
The current Virtuemart works like the old legendary Internet Explorer - "supposedly the best, but nothing works in it"  ;D

I sense a conspiracy.  ::) Perhaps new versions of the VM are created only to increase the number of posts like this one in another forum  ;D
https://forum.virtuemart.net/index.php?topic=146383.0

I think it would be better to fix any existing bugs instead of creating and implementing new and untested inventions that additionally break the entire component.

Title: Re: Please test for routing and datefields on j3 and j4
Post by: Milbo on October 02, 2022, 22:54:20 PM
https://forum.virtuemart.net/index.php?topic=148918.msg531517#msg531517

I think anything works now except the pagination in j4
Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on October 03, 2022, 14:41:20 PM
Quote from: Milbo on October 02, 2022, 22:54:20 PM
I think anything works now except the pagination in j4

Hi, It was just sarcasm. :)
Has this problem been resolved?
https://forum.virtuemart.net/index.php?topic=148857.0

Currently, for one of my websites, it is crucial for me
Title: Re: Please test for routing and datefields on j3 and j4
Post by: Milbo on October 05, 2022, 23:21:22 PM
As answered there, strange problem. But the pagination seems to be fixed.
Title: Re: Please test for routing and datefields on j3 and j4
Post by: _stu on October 13, 2022, 16:35:35 PM
I still have an issue with pagination - I can't get to the first page of products once I leave it. This occurs on category layouts that display subcategories and all products in subcategories, such as the top level category. Category layouts that display only products in the category (no subcategory products) work correctly; I can get to all pages.

Details:

Troubleshooting:

Conclusion: Pagination appears to be almost fixed, except for product in categories that include products in subcategories.
This bug (http://forum.virtuemart.net/index.php?topic=148574.msg531414#msg531414) still seems to be alive.
Title: Re: Please test for routing and datefields on j3 and j4
Post by: _stu on October 13, 2022, 23:21:19 PM
Digging in to the debug, I see that when going back to page #1, parseRoute($segments) function does not get called. It does get called when initially going to page 1 and every time you go to another page. It appears that it's only skipped when returning to page 1.
This results in the $segments variable not being set to
Array
(
    [ 0 ]   => results,1-0
)


Additionally, and I'm not sure whether it's related or not, I see that $limitstart doesn't get set when returning to page 1. It is set to 0 when initially going to page 1 and to 10 (for example) when going to page 2, but when returning to page 1, it is null.
Note that I'm not very confident in this last statement, because the buildRoute(&$query) function, where $start, $limit, and $limitstart are set, is called multiple times one one page, each time with different results (category, itemid, cart, etc.).

Hope this helps to determine how to fix the issue. My PHP skills are not sufficient to solve this one.
Title: Re: Please test for routing and datefields on j3 and j4
Post by: hazael on October 15, 2022, 12:38:08 PM
Milbo is such a "masochist" - He likes complicated solutions, that's why he keeps trying to fix it  ;)

There is a trivial way to do this. You don't need to know PHP to do this.
Log in to the database. Find your Virtuemart category in the #_menu table. In the "link" line at the end of the URL, add &limitstart=0
In the Virtuemart settings, set only one value for the paging sequence

You can also solve this problem with javascript.
-------------------------------------------------------------

In some cases, it may happen that the active pagination item will link to the home page. This is what happens on one of my sites. Generally you can block such an empty link
(I also have double tags...) My simple fix


echo str_replace(
array('<li><li>','</li></li>','class=""','title=""','href=""'),
array('<li>', '</li>','','','href="#" style="cursor:not-allowed;opacity:0.5;pointer-events:none"'), $this->vmPagination->getPagesLinks()
);

Title: Re: Please test for routing and datefields on j3 and j4
Post by: Milbo on October 18, 2022, 20:51:23 PM
Interesting idea to fix it, I could add this by default. BUT, what me gentles up,... is that we fix this shit now for joomla update the 4th  time or so. We fixed it for j2.5, for j3.5 and now for j4 again, at least.

Quote from: _stu on October 13, 2022, 23:21:19 PM
Digging in to the debug, I see that when going back to page #1, parseRoute($segments) function does not get called. It does get called when initially going to page 1 and every time you go to another page. It appears that it's only skipped when returning to page 1.

One of the joomla4 misteries.