News:

Looking for documentation? Take a look on our wiki

Main Menu

Please test for routing and datefields on j3 and j4

Started by Milbo, September 06, 2022, 10:32:24 AM

Previous topic - Next topic

Darko F.

#15
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

There in no problem if you fall. Problem is if you don't get up

hazael

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

Darko F.

#17
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()
There in no problem if you fall. Problem is if you don't get up

hazael

#18
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.


Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

hazael

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

Milbo

As answered there, strange problem. But the pagination seems to be fixed.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

_stu

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:

  • Joomla 4.2.3
  • VM com_virtuemart.4.0.7.10720_package (12OCT2022
  • PHP 8.0
  • Joomla SEF is on

Troubleshooting:

  • SEF URL for page 1 is always .../online-ordering-payment.html. The first time I go to this page, it gives me the first page of products. After leaving the first page, this URL sends me to the last page I was on, even if I go outside the shop and return.
  • SEF URL for other pages is, for example, .../online-ordering-payment/results,25-48.html?clearCart=0
  • If I manually enter URL .../online-ordering-payment/results,1-24.html?clearCart=0, I can get back to page 1.

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.

_stu

#23
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.

hazael

#24
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()
);


Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/