Menu

#38 Notice error in Items section

v2.3.1
closed
nobody
None
1
2015-01-09
2015-01-09
No

Getting an notice error going to the items page. Starts out with:
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: models/stock_locations.php
Line Number: 66

Followed by the following repeated 20 times:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$quantity
Filename: helpers/table_helper.php
Line Number: 222

Discussion

  • jekkos

    jekkos - 2015-01-09

    did you update the database schema prior to installing the new zip?

     
  • Andy Anderson

    Andy Anderson - 2015-01-09

    Yup, 3 times now, all with the same results. Also, I notice (which makes sense looking at the errors) nothing has quantities, due to the fact that it has errors looking up quantity.

     
  • Andy Anderson

    Andy Anderson - 2015-01-09

    Found the error, in the 2.3_to_2.3.1.sql on line 51, there is an error in the constrant as it tries to use a hard set database name which of course we use different name. heres the line:

    ADD CONSTRAINT ospos_grants_ibfk_1 FOREIGN KEY (permission_id) REFERENCES ospos.ospos_permissions(permission_id) ON DELETE CASCADE;

    our database isn't ospos so of course the constraints fail. If I remove the (incorrect) declaration of the database, everything works fine.

     
  • jekkos

    jekkos - 2015-01-09

    ok good point. I fixed this issue in the github repository.

     
  • jekkos

    jekkos - 2015-01-09
    • status: open --> closed