0

I am using module (in Magento 1.9.3.10) that extends the default Mage/Product model by adding a new attribute named Status with a corresponding file named Status.php residing in Package\ModuleName\Model\Catalog\Product\Attribute. The Status attribute also extends Mage_Eav_Model_Entity_Attribute_Source_Abstract.

If I try to access the REST API for products on either my development and production servers (with the required OAuth parameters), i.e http://localhost/magento/api/rest/products causes a 500 internal error whiles every other rest endpoint do not fail.

How can I include the custom attribute in the REST API without causing 500 internal errors?

NB: I am using an OAuth consumer which has been verified and I am able to fetch products IFF the custom module is uninstalled

asked Oct 18, 2018 at 17:05
2
  • you need to pass admin token Commented Oct 20, 2018 at 19:37
  • Please read the NB I have appended Commented Oct 21, 2018 at 21:55

1 Answer 1

0

I was able to find the cause of the problem. An observer was set on catalog_product_collection_load_before. It called a function that tries to access the the details of the user through Mage::getSingleton('admin/session')->getUser(). Unfortunately, this returns null when it is a REST call.

answered Oct 27, 2018 at 21:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.