Author Topic: [fixed]VM 2.0.21g: Category id 0 not published  (Read 23599 times)

z-analysts

  • Jr. Member
  • **
  • Posts: 162
Re: VM 2.0.21g: Category id 0 not published
« Reply #15 on: June 29, 2013, 17:51:47 pm »
Thanks, Milbo! I just removed the info message and now the page displays. I look forward to the next VM release.

Lee2008

  • Beginner
  • *
  • Posts: 9
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #16 on: July 02, 2013, 13:13:59 pm »
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

  • Beginner
  • *
  • Posts: 11
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #17 on: July 10, 2013, 10:26:14 am »
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

  • Beginner
  • *
  • Posts: 11
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #18 on: July 10, 2013, 10:36:33 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #19 on: July 10, 2013, 12:45:16 pm »
facepalm. So you say I did it for category but not for categories? grmbl.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jkrabbenbos

  • Beginner
  • *
  • Posts: 11
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #20 on: July 10, 2013, 16:17:54 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #21 on: July 10, 2013, 16:46:27 pm »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #22 on: July 13, 2013, 12:31:35 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.
Code: [Select]
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
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Snake 60

  • Beginner
  • *
  • Posts: 12
    • Snake 60 BLOG
  • VirtueMart Version: 2.0.22a
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #23 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:
Code: [Select]
$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:
Code: [Select]
$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

  • Beginner
  • *
  • Posts: 29
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #24 on: July 14, 2013, 12:26:32 pm »
worked for me too - thank you - using 2.0.22
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.
Code: [Select]
if(!$category->published){
vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL',$category->category_name,$categoryId);
return false;
}
just remove this in your view.html.php.

fastpat27

  • Jr. Member
  • **
  • Posts: 108
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #25 on: July 15, 2013, 13:51:52 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:
Code: [Select]
$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:
Code: [Select]
$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

  • Beginner
  • *
  • Posts: 3
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #26 on: July 23, 2013, 09:50:21 am »
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

  • Beginner
  • *
  • Posts: 11
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #27 on: July 24, 2013, 12:46:19 pm »
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

  • Beginner
  • *
  • Posts: 3
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #28 on: July 24, 2013, 15:15:11 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: [fixed]VM 2.0.21g: Category id 0 not published
« Reply #29 on: July 25, 2013, 22:23:10 pm »
I am sorry, I dont know, what happens, when you download the file and use the joomla extension manager and install it there?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/