HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Problem with products

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#99726 (In Topic #19590)
Avatar

Honoured member

I am getting critical error on all products. can you give a look and let me know what's wrong? 

http://www.selfpubmag.com/catalogues/entry/products-home/advertising/full-column-ad.htm

Fatal error: Call to a member function evaluate() on a non-object in /home/content/92/10010992/html/magazine/sources/hooks/systems/ecommerce/catalogue_items.php on line 669

Critical error – bailing out

PHP ERROR [1] Call to a member function evaluate() on a non-object in sources/hooks/systems/ecommerce/catalogue_items.php on line 669 (version: 9.0.8, PHP version: 5.3.24, URL: /catalogues/entry/products-home/advertising/full-column-ad.htm)

Stack trace…

File -> '/home/content/92/10010992/html/magazine/sources/failure.php'
Line -> 792
Function -> 'die_html_trace'
Args -> array ( 0 => 'PHP ERROR [1] Call to a member function evaluate() on a non-object in sources/hooks/systems/ecommerce/catalogue_items.php on line 669 (version: 9.0.8, PHP version: 5.3.24, URL: /catalogues/entry/products-home/advertising/full-column-ad.htm)', )

File -> '/home/content/92/10010992/html/magazine/sources/global2.php'
Line -> 1012
Function -> '_fatal_exit'
Args -> array ( 0 => 'PHP ERROR [1] Call to a member function evaluate() on a non-object in sources/hooks/systems/ecommerce/catalogue_items.php on line 669', )

File -> '/home/content/92/10010992/html/magazine/sources/failure.php'
Line -> 224
Function -> 'fatal_exit'
Args -> array ( 0 => 'PHP ERROR [1] Call to a member function evaluate() on a non-object in sources/hooks/systems/ecommerce/catalogue_items.php on line 669', )

File -> '/home/content/92/10010992/html/magazine/sources/global2.php'
Line -> 875
Function -> '_ocportal_error_handler'
Args -> array ( 0 => 'error', 1 => 1, 2 => 'Call to a member function evaluate() on a non-object', 3 => 'sources/hooks/systems/ecommerce/catalogue_items.php', 4 => 669, )

File -> '/home/content/92/10010992/html/magazine/sources/global2.php'
Line -> 811
Function -> 'ocportal_error_handler'
Args -> array ( 0 => 1, 1 => 'Call to a member function evaluate() on a non-object', 2 => '/home/content/92/10010992/html/magazine/sources/hooks/systems/ecommerce/catalogue_items.php', 3 => 669, )

Function -> 'catch_fatal_errors'
Args -> array ( )

Back to the top
 
Posted
Rating:
#99729
Avatar

This is likely caused by reordering/deleting/changing-the-type of default fields, which isn't permitted. The documentation mentions you shouldn't reorder, but I will clarify it. However, it is a bug because ocPortal shouldn't give a stack trace in the event.

A fixed version of the sources/hooks/systems/ecommerce/catalogue_items.php file is here:
https://raw.github.com/chrisgraham/ocPortal/5fde816a204bf2297a16d7230cd8ec57cfd1e2b6/sources/hooks/systems/ecommerce/catalogue_items.php

And due to be out in the next patch release.

Specifically, the 4th field in the eCommerce catalogue is supposed to be the stock count, an integer field.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#99736
Avatar

Honoured member

I just looked….and the 4th field in my products catalog IS stock count, and an integer.

My products catalog was working fine previously. Not sure exactly when it went like this. I have not changed any orders or anything in it, except today I added a new subcatagory and put one product in it, which when i went to look at it, did not work, so i looked at the rest, and they do not work anymore, and i know they did in the past because people ordered through it.

If I copy the text of that version of the php over my current one, will it fix the problem?
Back to the top
 
Posted
Rating:
#99737
Avatar

Hmm, it may be 100% a bug then. It is possible something changed in the catalogues system.

Yes, the fix should solve it.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: