VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: jjk on August 24, 2011, 08:57:42 AM

Title: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: jjk on August 24, 2011, 08:57:42 AM
When I select a filter in 'Product List', the following Notice still shows up:
Notice: Undefined index: category in D:\xampp\htdocs\J17vm2svn\libraries\joomla\application\component\view.php on line 371
(But after the latest commits the ordering now seems to work nicely)  :)

When I try to assign an image to a product using 'Image Attach New' in the 'Product Edit - Product Images' view, I'm still unable to select pages other than page 1 in the 'Media List' popup (in my case currently 36 unselectable pages). When I click a page number, the button switches to grey background color, but the page doesn't switch to the selected page number. Somebody seems to have glued it to page 1 in the code :-)

-----------------
BTW - on the 'Product Edit' page - 'Product Information' tab - 'Product Details Page', the default setting seems to be "pdf" instead of "default".
Title: Re: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: Milbo on August 25, 2011, 10:29:49 AM
Quote from: jjk on August 24, 2011, 08:57:42 AM
When I select a filter in 'Product List', the following Notice still shows up:
Notice: Undefined index: category in D:\xampp\htdocs\J17vm2svn\libraries\joomla\application\component\view.php on line 371
Crazy, Using the category filter in the product list in BE creates this error
Notice: Undefined index: category in D:\Users\Milbo\Coden\workspace\VM2_j17\libraries\joomla\application\component\view.php on line 371

the line calling it, is $category_model = $this->getModel('category');

I just replaced that line doing it manually

if(!class_exists('VirtueMartModelCategory')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'category.php');
  $category_model = new VirtueMartModelCategory();

and it works! What is j1.7 doing that suddenly the getModel method does not work anylonger as expected?

Quote from: jjk on August 24, 2011, 08:57:42 AM
(But after the latest commits the ordering now seems to work nicely)  :)
Nice to hear that

Quote from: jjk on August 24, 2011, 08:57:42 AM
When I try to assign an image to a product using 'Image Attach New' in the 'Product Edit - Product Images' view, I'm still unable to select pages other than page 1 in the 'Media List' popup (in my case currently 36 unselectable pages). When I click a page number, the button switches to grey background color, but the page doesn't switch to the selected page number. Somebody seems to have glued it to page 1 in the code :-)
Works fine in j1.5, but not j1.7. We are on it.

Quote from: jjk on August 24, 2011, 08:57:42 AM
BTW - on the 'Product Edit' page - 'Product Information' tab - 'Product Details Page', the default setting seems to be "pdf" instead of "default".
pre selects for me the default as layout in j1.5 and j1.7.
Title: Re: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: jjk on August 25, 2011, 21:44:48 PM
Quote from: jjk on August 24, 2011, 08:57:42 AM
(But after the latest commits the ordering now seems to work nicely)  :)

...just curious - in the BE Product List the "Reorder" column displays only when a filter is set. Working as designed or is the column actually missing in that view? (J1.7)
Title: Re: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: biolika on November 08, 2011, 03:56:09 AM
My module does not properly create the categories for the VM-2
Which table shows the categories for products.
http://forum.virtuemart.net/index.php?topic=84632.0
Title: Re: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: impleri on November 08, 2011, 15:09:37 PM
Quote from: Milbo on August 25, 2011, 10:29:49 AM
and it works! What is j1.7 doing that suddenly the getModel method does not work anylonger as expected?
JView::getModel() can only retrieve models previously set (generally by in JController()) and indexed by strtolower(JModel::getName()). Perhaps the value from getName is somehow different than `category`? Easiest way is to test is to define VirtueMartModelCategory::$name (not $_name) and see if the setModel/getModel works.
Title: Re: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: Milbo on November 08, 2011, 19:14:38 PM
I never understood the sense of this yet. Why not just using the require and new?
Title: Re: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: impleri on November 09, 2011, 02:12:56 AM
Time. Processing the opcodes for require are brutal (and require_once is worse). It ends up being faster to use a central function which does, for all intents and purposes, perform like __autoload(). Only loading a class file once rather than having a require_once() in every file that needs the class is much faster. In Joomla, this is organised through the jimport() function and the getInstance() method in JController, JView, JModel, etc.
Title: Re: Two unresolved issues using J1.7/VM2 SVN Revision 3936
Post by: Milbo on November 09, 2011, 03:31:55 AM
of course we use always the if class exist construction, I measured the time for 1000 calls, it is always the same, if you call it one time or 1000 times,...