lat9 / upsoauth

A Zen Cart UPS shipping module that makes use of UPS' RESTful/Oauth API
GNU General Public License v2.0
3 stars 3 forks source link

Module updates still insist that reinstall is required #20

Closed proseLA closed 12 months ago

proseLA commented 12 months ago

i have been following a little bit the issue on the forum, that all seems related to this line: https://github.com/lat9/upsoauth/blob/a3c42b890771422a63ae37630d9a032ada8929e1/includes/modules/shipping/upsoauth.php#L88

and the problem looks to be related the the number of config keys.

telling people to uninstall, and thereby lose all of their config values, seems like a bunch of extra work for store owners.

why not have a function or modify the install function, that checks if each key is defined, and if not to insert it into the config table and then define it. it seems that you already know what the problem is; why not just resolve it programatically, as opposed to forcing the user to do something?

lat9 commented 12 months ago

It's actually (I'm pretty sure based on recent forum posts) that it's actually a change here https://github.com/lat9/upsoauth/blob/a3c42b890771422a63ae37630d9a032ada8929e1/includes/modules/shipping/upsoauth.php#L93-L94

My best guess as to what happened is that "early adopters" (i.e. those who stepped in at v0.0.1) are the ones running into this. I'll be adding additional versions to that upper case statement to correct the issue.