VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: Grisu74 on October 05, 2016, 22:59:58 PM

Title: error after update
Post by: Grisu74 on October 05, 2016, 22:59:58 PM
Hello,

I upgraded virtuemart latest version 3.0.18, I have an error in your shopping cart, when I want to add or edit shipping or billing address. (see screenshot)

I await news

Thanks

Title: Re: error after update
Post by: GJC Web Design on October 06, 2016, 15:28:22 PM
but what are the actual urls?

with and without SEF
Title: Re: error after update
Post by: Grisu74 on October 06, 2016, 21:33:23 PM
with SEF: it/virtuemart-account-maintenance/editaddresscartBT

error: /it/user/editaddresscartBT

without SEF: index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT&lang=it

error: does not exist

I await news

Thank you
Title: Re: error after update
Post by: GJC Web Design on October 06, 2016, 23:11:37 PM
hmmm ..  the non sef is obviously correct

when I have a PUBLIC menu to the VM account maintenance called  alias  /my-account

the working SEF menu to the BT address is    /my-account/editaddresscartBT

I don't understand which of the 2 below is what you have
Title: Re: error after update
Post by: Grisu74 on October 07, 2016, 00:02:55 AM
How can I fix?  ???

Thanks
Title: Re: error after update
Post by: Milbo on October 07, 2016, 09:44:52 AM
I wonder why it tries to find a category, when the link looks like this 

index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT&lang=it

How does it work in other languages?
Title: Re: error after update
Post by: Grisu74 on October 07, 2016, 22:06:04 PM
same problem with other languages.

I repeat:

The problem arose after virtuemart upgrade from 3.0.16 to 3.0.18

at this time I got back to version 3.0.16 to eliminate the problem, awaiting solution.

Thanks
Title: Error after update
Post by: marscom on November 07, 2016, 19:15:06 PM
Hi all,

same problem here: after updating I fall back to http://eisenring-lyss.ch/index.php/de/user/editaddresscartBT
instead of getting the form page as it perfectly worked before updating. The form is now being added to the index.php.

Seems like the problem has to do with the language affix: lang/de-DE resp. lang/fr-FR.
It partially works when I strip this part with htaccess. But: I cannot checkout;  I'm stuck on the registration form.

This is what I tried in htaccess:

RewriteEngine on
RewriteRule ^(.+?/)?lang/de-DE(?:/(.*))?$ /$1$2 [NC,R=301,L]
RewriteEngine on
RewriteRule ^(.+?/)?lang/fr-FR(?:/(.*))?$ /$1$2 [NC,R=301,L]


I'm also biting my fingernails for a solution...

marscom
Title: Re: error after update
Post by: Milbo on November 08, 2016, 16:35:28 PM
Please test this version http://dev.virtuemart.net/attachments/download/1027/com_virtuemart.3.0.18.2_extract_first.zip
Title: Re: error after update
Post by: Grisu74 on November 13, 2016, 00:21:13 AM
I have the same problem if I want to write a review for a product, it must be in error page even with Virtuemart version 3.0.16 :-\ :-\ :-\
Title: Re: error after update
Post by: Milbo on November 13, 2016, 09:02:25 AM
But to write a review is another problem, then not having the right link.  ??
Title: Re: error after update
Post by: Grisu74 on November 13, 2016, 14:40:31 PM
The problem is always the same. When disabled Search Engine Friendly URLs the problem does not exist.
I repeat, the problem of error pages appear when active Search Engine Friendly URLs.

Thank you

Title: Re: error after update
Post by: Milbo on November 14, 2016, 12:03:45 PM
Grisu, there is the error type "works without SEF, but not with SEF", but any errors of these type are completly different to debug. The error is sometimes in the router.php, but sometimes at a completly different file and sometimes it need fixes in both.

Quote from: marscom on November 07, 2016, 19:15:06 PM
Hi all,

same problem here: after updating I fall back to http://eisenring-lyss.ch/index.php/de/user/editaddresscartBT
instead of getting the form page as it perfectly worked before updating. The form is now being added to the index.php.

Seems like the problem has to do with the language affix: lang/de-DE resp. lang/fr-FR.
The form is now being added to the index.php? I do not understand what you mean. Yes the languages maybe the problem. How did you setup your menues?

Quote from: marscom on November 07, 2016, 19:15:06 PM
This is what I tried in htaccess:

RewriteEngine on
RewriteRule ^(.+?/)?lang/de-DE(?:/(.*))?$ /$1$2 [NC,R=301,L]
RewriteEngine on
RewriteRule ^(.+?/)?lang/fr-FR(?:/(.*))?$ /$1$2 [NC,R=301,L]

This is very quickndirty and "useless". Any "fix" by htaccess makes it usually worse.
Title: Re: error after update
Post by: Studio 42 on November 14, 2016, 14:53:29 PM
DO not forget to disable link "VMonepage is built by joomlaprofessionals.com" in the vmonepage plugin
For the user edit adress, i have no errors(but perhaps it's because your htaccess changes).
Title: Re: error after update
Post by: Milbo on November 14, 2016, 14:57:05 PM
and maybe this version fixes the problem, again some router corrections http://dev.virtuemart.net/attachments/download/1029/com_virtuemart.3.0.18.3_extract_first.zip
Title: Re: error after update
Post by: Grisu74 on November 14, 2016, 17:49:05 PM
Hi,

I tried this latest version of virtuemart 3.0.18.3 and the first problem seems solved, but still the problem of error page when the customer wants to add review.
( see screenshot )

Thank you

Title: Re: error after update
Post by: Studio 42 on November 14, 2016, 18:42:13 PM
Hi,
It's perhaps a template overide problem. Do a test using protostar template, because this template have no overide.
Regards,
Patrick
Title: Re: error after update
Post by: Grisu74 on November 14, 2016, 20:56:34 PM
Hi

With Protostar template is all ok, the review ok, what should I do to correct the template "Quasar" in use?

Thank you

Title: Re: error after update
Post by: Jumbo! on November 14, 2016, 21:17:16 PM
We can never know what is wrong in your 3rd party template. You need to contact your template developer to fix their problem.
Title: Re: error after update
Post by: Studio 42 on November 14, 2016, 21:19:21 PM
Quote from: Grisu74 on November 14, 2016, 20:56:34 PM
Hi

With Protostar template is all ok, the review ok, what should I do to correct the template "Quasar" in use?

Thank you


It's possilble that template code is obselete. Try the template support, or contact me, you have already my skype.
Title: Re: error after update
Post by: Grisu74 on November 15, 2016, 23:02:34 PM
Quote from: Milbo on November 08, 2016, 16:35:28 PM
Please test this version http://dev.virtuemart.net/attachments/download/1027/com_virtuemart.3.0.18.2_extract_first.zip

There is a new error, with this version (3.0.18.2 virtuemart) the template is not applied for the menu item "Acquista on line" (see screenshot)

I'm testing locally

Thank you
Title: Re: error after update
Post by: Grisu74 on November 15, 2016, 23:08:13 PM
Quote from: Studio 42 on November 14, 2016, 21:19:21 PM
Quote from: Grisu74 on November 14, 2016, 20:56:34 PM
Hi

With Protostar template is all ok, the review ok, what should I do to correct the template "Quasar" in use?

Thank you


It's possilble that template code is obselete. Try the template support, or contact me, you have already my skype.

I made Template update, the problem is not solved
Title: Re: error after update
Post by: Studio 42 on November 16, 2016, 00:50:59 AM
In joomla config change server php debug mode to maximum, you have an error but it's not displayed.
Title: Re: error after update
Post by: Grisu74 on November 16, 2016, 01:46:10 AM
Quote from: Studio 42 on November 16, 2016, 00:50:59 AM
In joomla config change server php debug mode to maximum, you have an error but it's not displayed.

These are the site errors in local (see screenshot)

Thank you
Title: Re: error after update
Post by: Studio 42 on November 16, 2016, 02:14:07 AM
Yes, this part need to be updated, i cannot give you an answer, it need some testing.
Title: Re: error after update
Post by: Ghost on November 16, 2016, 08:34:16 AM
You need to update your category view override. See changes here http://dev.virtuemart.net/projects/virtuemart/repository/diff/branches/com_virtuemart.3.0.12.4/components/com_virtuemart/views/category/tmpl/default.php?utf8=%E2%9C%93&rev=9200&rev_to=9139

As minimum to fix the error, you need to change this part:


$products = array();
$products[0] = $this->products;
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));
to this:


if($this->fallback){
$p = $this->products;
$this->products = array();
$this->products[0] = $p;
vmdebug('Refallback');
}
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));


Or you could just update the entire override and reimplement your changes.
Title: Re: error after update
Post by: Grisu74 on November 16, 2016, 14:34:49 PM
Quote from: Ghost on November 16, 2016, 08:34:16 AM
You need to update your category view override. See changes here http://dev.virtuemart.net/projects/virtuemart/repository/diff/branches/com_virtuemart.3.0.12.4/components/com_virtuemart/views/category/tmpl/default.php?utf8=%E2%9C%93&rev=9200&rev_to=9139

As minimum to fix the error, you need to change this part:


$products = array();
$products[0] = $this->products;
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));
to this:


if($this->fallback){
$p = $this->products;
$this->products = array();
$this->products[0] = $p;
vmdebug('Refallback');
}
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));


Or you could just update the entire override and reimplement your changes.

I tried not solve the problem.

Thanks
Title: Re: error after update
Post by: Grisu74 on November 16, 2016, 14:37:28 PM
Quote from: Studio 42 on November 16, 2016, 02:14:07 AM
Yes, this part need to be updated, i cannot give you an answer, it need some testing.

I'm testing locally, I can not afford that the site does not work
Title: Re: error after update
Post by: Ghost on November 16, 2016, 14:44:43 PM
Are you getting the same error after changes? Can you upload your category default.php override here?
Title: Re: error after update
Post by: Grisu74 on November 16, 2016, 14:53:38 PM
Quote from: Ghost on November 16, 2016, 14:44:43 PM
Are you getting the same error after changes? Can you upload your category default.php override here?

Title: Re: error after update
Post by: Ghost on November 16, 2016, 17:35:00 PM
You added new code but didn't remove old broken code. Remove this:

$products = array();
$products[0] = $this->products;
echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));
Title: Re: error after update
Post by: Jumbo! on November 16, 2016, 20:06:53 PM
If you have specific menu items for the category pages then open those menu items, go to the tabs called "Virtuemart category view settings" and "Virtuemart subordinated category settings". Now disable the following options under these two tabs -

1. Show featured
2. Show discontinue
3. Show latest products
4. Show Top ten products
5. Show recent

If you do not have any menu items for category pages then disable the same above 5 options in VirtueMart Configuration.

This will allow the old category page layouts to work properly under this new version of VirtueMart.
Title: Re: error after update
Post by: Grisu74 on November 16, 2016, 21:50:40 PM
Quote from: Jumbo! on November 16, 2016, 20:06:53 PM
If you have specific menu items for the category pages then open those menu items, go to the tabs called "Virtuemart category view settings" and "Virtuemart subordinated category settings". Now disable the following options under these two tabs -

1. Show featured
2. Show discontinue
3. Show latest products
4. Show Top ten products
5. Show recent

If you do not have any menu items for category pages then disable the same above 5 options in VirtueMart Configuration.

This will allow the old category page layouts to work properly under this new version of VirtueMart.

I tried, not solves the problem completely, some product return error page.

Thanks
Title: Re: error after update
Post by: Milbo on November 17, 2016, 16:02:48 PM
some products? or all products? still when you try to make a review? or directly when you open it
Title: Re: error after update
Post by: Grisu74 on November 17, 2016, 20:19:06 PM
Quote from: Milbo on November 17, 2016, 16:02:48 PM
some products? or all products? still when you try to make a review? or directly when you open it

the category is ok but when I click the products present in the category some products return error page.

Thank you
Title: Re: error after update
Post by: Grisu74 on November 18, 2016, 01:27:52 AM
Now I'm testing in folder www.venezianeplisse.com/test (http://www.venezianeplisse.com/test):

- Joomla 3.6.4
- Virtuemart 3.0.18  (no virtuemart 3.0.18.3)

I enabled Search Engine Friendly URLs, I created to test account for you
user: test
psw: test

Now you can see the mistakes of "ADD/EDIT BILLING ADDRESS INFORMATION" and "ADD/EDIT SHIPMENT ADDRESS" (when you save billing or address information, back on to change address, returns error)

You can also see error "SUBMIT REVIEW".


I am attaching .htaccess file for your vision if it is correct. (in txt otherwise I could not attach)

I await news

Thank you
Title: Re: error after update
Post by: Studio 42 on November 18, 2016, 03:01:18 AM
I tested, no problems
Title: Re: error after update
Post by: Grisu74 on November 18, 2016, 03:27:44 AM
Quote from: Studio 42 on November 18, 2016, 03:01:18 AM
I tested, no problems

impossible
Title: Re: error after update
Post by: Jumbo! on November 18, 2016, 06:48:57 AM
I also tested your site but could not find any problem. Working perfectly fine.

I noticed that you are using Cloudflare.com. Therefore you are probably still seeing some old cached pages. Clear cache in Cloudflare and also of your browser. Now check again.

P.S. My previous post was to resolve the category page display issue but not for product details page. VM 3.0.18.3 does not have any changes in product details page layout from its previous versions.
Title: Re: error after update
Post by: Studio 42 on November 18, 2016, 11:18:18 AM
I tested review and this redirect to the product without the category. So you have a problem or perhaps Virtuemart have a problem to redirect.
in the productdetails controller
public function review () {
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
The category is missing
add before this line
$cat_id = vRequest::getInt('virtuemart_category_id',0);
and change line to
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id=' . $cat_id, FALSE), $msg);

Should solve it
Title: Re: error after update
Post by: Studio 42 on November 18, 2016, 12:09:29 PM
For the other problem, add a new menu item link(this not need to have an associate module) for user account
Title: Re: error after update
Post by: Grisu74 on November 18, 2016, 13:04:52 PM
to me the problem also occurs in private mode, even locally, and even from my phone

??? ???
Title: Re: error after update
Post by: Studio 42 on November 18, 2016, 13:10:20 PM
Quote from: Grisu74 on November 18, 2016, 13:04:52 PM
to me the problem also occurs in private mode, even locally, and even from my phone

??? ???
Please read my messages and do the modifications. I think for the reviews, this should work and for the other problem, perhaps too.
Regards,
Patrick
Title: Re: error after update
Post by: Grisu74 on November 18, 2016, 14:01:01 PM
Quote from: Studio 42 on November 18, 2016, 12:09:29 PM
For the other problem, add a new menu item link(this not need to have an associate module) for user account

I did not understand, I have to add that menu? (see screenshot)

Thank you
Title: Re: error after update
Post by: Grisu74 on November 18, 2016, 14:16:04 PM
Quote from: Studio 42 on November 18, 2016, 11:18:18 AM
I tested review and this redirect to the product without the category. So you have a problem or perhaps Virtuemart have a problem to redirect.
in the productdetails controller
public function review () {
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
The category is missing
add before this line
$cat_id = vRequest::getInt('virtuemart_category_id',0);
and change line to
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id=' . $cat_id, FALSE), $msg);

Should solve it

this is the path?

www.venezianeplisse.com/test/components/com_virtuemart/controllers

Thank you
Title: Re: error after update
Post by: Studio 42 on November 18, 2016, 15:15:28 PM
Joomla Menu item type, is virtuemart>user

For the path, yes its JOOMLASITE/components/com_virtuemart/controllers/productdetails.php
Title: Re: error after update
Post by: Grisu74 on November 18, 2016, 19:27:18 PM
Quote from: Studio 42 on November 18, 2016, 15:15:28 PM
Joomla Menu item type, is virtuemart>user

For the path, yes its JOOMLASITE/components/com_virtuemart/controllers/productdetails.php

I do not find the code.


Title: Re: error after update
Post by: Milbo on November 18, 2016, 19:33:42 PM
you may try instead http://dev.virtuemart.net/attachments/download/1030/com_virtuemart.3.0.18.4_extract_first.zip
Title: Re: error after update
Post by: Grisu74 on November 18, 2016, 21:34:43 PM
Quote from: Milbo on November 18, 2016, 19:33:42 PM
you may try instead http://dev.virtuemart.net/attachments/download/1030/com_virtuemart.3.0.18.4_extract_first.zip

always the same problems
Title: Re: error after update
Post by: Studio 42 on November 21, 2016, 17:27:27 PM
Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);

tested and work.
Title: Re: error after update
Post by: Studio 42 on November 21, 2016, 18:07:11 PM
For the other problem, this is the breaking line :
if ( isset($jmenu['user']) and !isset($query['Itemid']) ) $query['Itemid'] = $jmenu['user'];
itemId is always set, so this never work
I checked for existing menu link and it exist "virtuemart-account-maintenance", but "user" is always used and redirect as a non existing category by Joomla com_content, but cart have a itemid too, but is not set so Joomla use default main page itemid .

So i changed in router file
// if ( isset($jmenu['user']) and !isset($query['Itemid']) ) $query['Itemid'] = $jmenu['user'];
if ( isset($jmenu['user']) ) $query['Itemid'] = $jmenu['user'];


And all is working now.         
Title: Re: error after update
Post by: Milbo on November 21, 2016, 18:57:19 PM
Hmm Patrick, I wonder which router file do you edit. The router in the svn has

case 'user';

if ( isset($jmenu['user'])) $query['Itemid'] = $jmenu['user'];
Title: Re: error after update
Post by: Milbo on November 21, 2016, 19:37:26 PM
Quote from: Studio 42 on November 21, 2016, 17:27:27 PM
Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);

tested and work.

Where? Do you mean controllers/productdetails.php
Title: Re: error after update
Post by: Studio 42 on November 21, 2016, 19:41:27 PM
This is vm 3.0.18, September 20 2016 from the http://www.venezianeplisse.com/test site
Title: Re: error after update
Post by: Studio 42 on November 21, 2016, 19:42:32 PM
Quote from: Milbo on November 21, 2016, 19:37:26 PM
Quote from: Studio 42 on November 21, 2016, 17:27:27 PM
Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);


Yes product details controller in public function review () {
tested and work.

Where? Do you mean controllers/productdetails.php

Yes in controller public function review () {
Title: Re: error after update
Post by: Milbo on November 21, 2016, 20:01:28 PM
Quote from: Milbo on November 21, 2016, 18:57:19 PM
Hmm Patrick, I wonder which router file do you edit. The router in the svn has

case 'user';

if ( isset($jmenu['user'])) $query['Itemid'] = $jmenu['user'];

Quote from: Studio 42 on November 21, 2016, 19:41:27 PM
This is vm 3.0.18, September 20 2016 from the http://www.venezianeplisse.com/test site

Then it did not update. You fixed old code. :-(
Title: Re: error after update
Post by: Milbo on November 21, 2016, 20:02:20 PM
Quote from: Studio 42 on November 21, 2016, 19:42:32 PM
Quote from: Milbo on November 21, 2016, 19:37:26 PM
Quote from: Studio 42 on November 21, 2016, 17:27:27 PM
Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);


Yes product details controller in public function review () {
tested and work.

Where? Do you mean controllers/productdetails.php

Yes in controller public function review () {

okey, I add it, cant hurt.