mc12345678 / Stock_By_Attributes_Combined

This combines the Files from SBA 1.5.3 and SBA 1.5.4 to provide a single distribution for updating applicable to ZC 1.5.0, 1.5.1, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7 and 1.5.8.
GNU General Public License v2.0
6 stars 8 forks source link

Undefined Constant Warning Notice #106

Closed daphilli224 closed 1 year ago

daphilli224 commented 2 years ago

After installation of SBA, undefined constant warning is issued for STOCK_SET_SBA_NUMRECORDS when accessing SBA from admin catalog menu. Note that the install was done on zencart v1.5.7d with no products in the database yet. Logs attached.

SBA Undefined Constant Warning Logs.txt .

mc12345678 commented 2 years ago

My apologies for not responding sooner. I misunderstood/recalled a different potential issue and was unnecessarily trying to recall why an area of code would purposefully not have a test for the existence of a constant. Having looked at the specific report and associated file, the issue appears to be that the most recent install/upgrade did not get fully executed. wait though. There may have been a reason to either not fully execute or even possibly to undo a portion of it.

Would you mind identifying how the current issue may have come to be? I'm interested in knowing if this database previously had sba installed, if the files had been recently upgraded/replaced, what if any of the install operations had been performed. Again, wait before running off and executing them. There may still be an issue with the install code that needs to be addressed. Unfortunately, it's sad that such a potentially minor thing is going to lead to catastrophic failure in the future, but it is also a necessary consideration of the php development community.

I expect that even once product have been added that this set of logs will continue to be issued as a result of identifying where that define is added to the configuration table.

daphilli224 commented 2 years ago

I was building a new version of zen cart for 1.5.7d from the ground up. I ran the zc install program and selected no test data be installed in the database. I then installed the following plugins in the order listed on the newly installed zc without any data in the database: Edit Orders 4.6.2 Sales Report 3.5.0 Clone Template 1.2.1 and cloned the classic_responsive template. I then removed the added cloned template files and Clone Template 1.2.1 due to an incorrect spelling of the cloned template. I then reinstalled Clone Template 1.2.1 and correctly cloned the classic_responsive template Stock by Attributes 1.5.4 using the 6/10/2021 distribution from GitHub.

No core files were changed by adding these add-ons other than SBA which modified admin/packingslip.php and includes/templates/MY_TEMPLATE/templates/tpl_shopping_cart_default.php. No data was ever added to any of the tables.

My objective was to get all the tables added or modified by the add-ons in place in the database before I started to move data from 1.5.7c to 1.5.7d and make my other customizations.

Hope this helps.

Dave

On Jun 2, 2022, at 4:14 AM, mc12345678 @.***> wrote:

My apologies for not responding sooner. I misunderstood/recalled a different potential issue and was unnecessarily trying to recall why an area of code would purposefully not have a test for the existence of a constant. Having looked at the specific report and associated file, the issue appears to be that the most recent install/upgrade did not get fully executed. wait though. There may have been a reason to either not fully execute or even possibly to undo a portion of it.

Would you mind identifying how the current issue may have come to be? I'm interested in knowing if this database previously had sba installed, if the files had been recently upgraded/replaced, what if any of the install operations had been performed. Again, wait before running off and executing them. There may still be an issue with the install code that needs to be addressed. Unfortunately, it's sad that such a potentially minor thing is going to lead to catastrophic failure in the future, but it is also a necessary consideration of the php development community.

I expect that even once product have been added that this set of logs will continue to be issued as a result of identifying where that define is added to the configuration table.

— Reply to this email directly, view it on GitHub https://github.com/mc12345678/Stock_By_Attributes_Combined/issues/106#issuecomment-1144579241, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVXNN2HMAFKPUA2OD6E7IZDVNBUNLANCNFSM5V7QAFEA. You are receiving this because you authored the thread.

daphilli224 commented 1 year ago

Thank you for supporting this plugin and making it available for zc158! Dave