[fixed]VM 2.0.21g: Category id 0 not published

Started by z-analysts, June 26, 2013, 23:06:14 PM

Previous topic - Next topic

z-analysts

Thanks, Milbo! I just removed the info message and now the page displays. I look forward to the next VM release.

Lee2008

Thanks so much Milbo!
Perfect fix for me :D
Just deleted that line and now my categories display is beautiful once again.

Thank you thank you
Regards Lee

jkrabbenbos

#17
It seems that this did not make the 2.0.22 !!

But the code is different from what is shown here. After upgrading to 2.0.22 it still shows the error message. I searched the code and I see it is embedded in another if statement.
Regards,
Jan

----------------------
Joomla 2.5.16
VM 2.0.24c (2.0.26 on the development site)

jkrabbenbos

An addition to my previous message: it is the view.html.php from the categories directory that is the problem. I commented out the code as given earlier in this thread and now it works.
The extra "if" construction is in the view.html.php from the category directory.
Regards,
Jan

----------------------
Joomla 2.5.16
VM 2.0.24c (2.0.26 on the development site)

Milbo

facepalm. So you say I did it for category but not for categories? grmbl.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jkrabbenbos

I double checked it in the download version of 2.0.22. In the categories view.html.php line 57-60 still has the code as described before. I did not change the file in the category directory.
Regards,
Jan

----------------------
Joomla 2.5.16
VM 2.0.24c (2.0.26 on the development site)

Milbo

In fact I dont like the categories view anyway. I think we should remove it and add an extra layout to the category view. The categories view was created as we had no layout controll.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

Quote from: Milbo on June 29, 2013, 17:39:02 PM
you can also just remove the info message and the return. The fix works 100%. Franzpeter got a new version and has not anylonger the problem.

if(!$category->published){
vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL',$category->category_name,$categoryId);
return false;
}

just remove this in your view.html.php.

In 2.0.22 the problem still exist. This fix wokrs...
Thank you
Он-лайн магазин за фототапети http://mishelfoster.com

Snake 60

I fix this problem in 2.0.22 version by deleting one of the two sign "=" in line 57 of file site\components\com_virtuemart\views\categories\view.html.php
Code before fix:$category = $categoryModel->getCategory($categoryId);
if($category->virtuemart_id!==0 and !$category->published){
vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL',$category->category_name,$categoryId);
return false;
}

Code after fix:$category = $categoryModel->getCategory($categoryId);
if($category->virtuemart_id!=0 and !$category->published){
vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL',$category->category_name,$categoryId);
return false;
}

and now it works :)

ecopure

worked for me too - thank you - using 2.0.22
Quote from: Milbo on June 29, 2013, 17:39:02 PM
you can also just remove the info message and the return. The fix works 100%. Franzpeter got a new version and has not anylonger the problem.

if(!$category->published){
vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL',$category->category_name,$categoryId);
return false;
}

just remove this in your view.html.php.

fastpat27

Quote from: Snake 60 on July 13, 2013, 23:23:24 PM
I fix this problem in 2.0.22 version by deleting one of the two sign "=" in line 57 of file site\components\com_virtuemart\views\categories\view.html.php
Code before fix:$category = $categoryModel->getCategory($categoryId);
if($category->virtuemart_id!==0 and !$category->published){
vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL',$category->category_name,$categoryId);
return false;
}

Code after fix:$category = $categoryModel->getCategory($categoryId);
if($category->virtuemart_id!=0 and !$category->published){
vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL',$category->category_name,$categoryId);
return false;
}

and now it works :)

Snake, simple well explained answer for me as a beginner. Sometimes the answers put up are ok for experienced coders but it's nice to know exactly where the file is and even the line number of the code. IG Thumbs up to Snake!

Regards
FP

Greggo25

Hey Guys

When I enter my URL address 4markets.com.au the code is coming up

Category id 0 not published

Now, I am a beginner and not sure how to implement the above fix, could someone explain the exact steps in lay mans terms of how to resolve this?

Thanks in advance

Gregg

jkrabbenbos

Hi Gregg,

What version of VirtueMart are you using? The update of 2.0.22a, which I tested this morning, does not have the problem anymore.
Regards,
Jan

----------------------
Joomla 2.5.16
VM 2.0.24c (2.0.26 on the development site)

Greggo25

Hey Jan

Oh OK, I seem to have the 2.0.22 version. 

I have tried to install the update but am getting the following error when I click on the 'update' link:

Invalid Token, in store config


Any reason this is happening?

Thanks

Gregg

Milbo

I am sorry, I dont know, what happens, when you download the file and use the joomla extension manager and install it there?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/