mc12345678 / Dynamic_Price_Updater

This module for Zen Cart automatically updates the product price when a atrribute is added to the product
Other
0 stars 0 forks source link

v3.0.7 installer does not process previous installer code #11

Closed torvista closed 7 years ago

torvista commented 7 years ago

Fresh ZC155e installation. Messagestack says installed ok but menu item does not appear on configuration menu. DB entries for configuration and configuration_group are installed but admin_pages no.

mc12345678 commented 7 years ago

Was admin/includes/installers/dpu/3_0_5.php included in the admin fileset prior to accessing admin to perform installation?

It is in that portion of the install that the admin page is installed.

Otherwise, I am unable to duplicate the issue. I even tried to improperly install the plugin placing the admin files in the catalog side (which results in the auto-deletion of the incorrectly placed auto_loader/config.dpu.php file and the generation of a myDebug log and it is this that possibly led to the generation of the ZC thread: https://www.zen-cart.com/showthread.php?222909-Plugin-sql-auto-installer-self-deletion). But even with this incorrect placement, followed by correct placement (without using the uninstall sql) all was correctly provided/installed when the entire plugin package was uploaded as directed by the readme instructions:

  1. Rename the YOUR_ADMIN folder to the name of your secret foldername.
  2. Rename the YOUR_TEMPLATE folders to the name of your custom template folder name.
  3. upload the files included in the "Installation files" folder
torvista commented 7 years ago

just tried again, same result. I see that only two configuration entries are inserted DPU_PLUGIN_CHECK and DPU_VERSION If I manually add the entry in the admin_pages table, it shows these two entries as expected. Note that this is on Xampp, locally, php 7.1.8, but there are no error logs

I started that thread as I had seen this without looking at it properly, and the autodelete thing annoys me/is another thing to remember. if (IS_ADMIN_FLAG === true) { $autoLoadConfig[999][] = array( 'autoType' => 'init_script', 'loadFile' => 'init_dpu_config.php' ); } else { @unlink(FILE); }

mc12345678 commented 7 years ago

Yeah, the unlink was added because someone had loaded the installer and related files to their catalog instead of the admin and as a result, any change to the admin configuration would not be "saved" and all settings were restored back to what they were in default though another instance of associated admin information would be generated which was incrementing the auto_increment value for one or more tables which ultimately could lead to overwrite of data if allowed to go on for too long when the number would revert back to 1...

Anyways, I do see that there have been changes made to the admin/init_includes file as seen by the following compare: https://github.com/mc12345678/Dynamic_Price_Updater/compare/v3.0.7...master

I believe there may have been a post about it in the forum as well.

Guess, I need to go ahead and issue a change instead of trying to make other improvements first...

Would be of benefit to others if you would also identify here the message of "satisfactory" install. Was it a single version that was shown and that being the latest?

mc12345678 commented 7 years ago

I changed the title to this thread somewhat based on a "workaround" that should function until a version higher than 3.0.7 is issues/released. When placing the admin/includes/installers/dpu files, load each one (starting with 3.0.5), navigate the admin once, load the next and repeat...

This is perhaps worse than having to remember to load a single sql file, but it is corrected in the master branch of this plugin.

mc12345678 commented 7 years ago

Fixed by v3.0.8: https://github.com/mc12345678/Dynamic_Price_Updater/releases/tag/v3.0.8 which has been posted for review on the ZC site to be made available at this link