Notice error in Items section
Brought to you by:
jekkos,
pappastech
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
did you update the database schema prior to installing the new zip?
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.
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
) REFERENCESospos
.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.
ok good point. I fixed this issue in the github repository.