 | |  | |
November 23rd, 2008, 12:44 PM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: May 2005
Posts: 21
| Bug in installer?
Hi,
I just upgraded my forum to 3.7.4 yesterday and tried upgrading PhotoPost vbGallery. Had a hard time getting it to upgrade properly, but finally solved it by looking through the installer codes. I'm sharing my experience and the solution here in case anyone else has the same problem. vbGallery techs should probably investigate if they missed something in the installer code.
My vbGallery before upgrading was 2.0 (as stated at the bottom of my gallery pages.
Followed instructions and edited the config file, uploaded the files, etc. When I tried the Upgrade option in the installer page, it just kept coming back to the Installer option page without visibly doing anything.
The problem was with the gallery_version stored in the adv_settings table in the database. It was "2.0". But looking in the code, for case "2.0", it expected the ppg_ prefixed tables to exist, but my tables were still using the old prefix.
The case statement previous to that is "2.0.0" and it rename the tables from the old prefix to the new prefix, so I restored my gallery tables and changed gallery_version in my table to "2.0.0". Ran the upgrade again and it renamed the tables. However, when I viewed the gallery page, I got several "PHP Warning: Invalid argument supplied for foreach()..." message. I looked at the code lines indicated and seemed that some option variable was not being initalised. So back to the installer code and I noticed that for case "2.0B2" the installer did some things involving adv_gallery_opt in the datastore table.
Restored the my gallery tables once again and set my gallery_version to "2.0B2". This time the upgrade worked like a charm.
So, tech team, you might have missed one of the versions put out by the previous guy (who came onboard from VBA (iirc) when PP bought over vbGallery). Seems my copy of vbGallery is similar to 2.0B2, although the gallery_version was set as "2.0".
I can't remember the exact sequence of release, but I believe the version I had is before 2.0B2. The installer code looks for and removes the "vp_wol4vbagallery" product in version 2.0B2 case statement and that is actually a product that I developed and the previous vbGallery guy asked from me for permission to use in the next release (I assume to be 2.0B2). I did not install that version probably because (a) it was a minor release, and (b) I have that product.
I'll be happy to answer any queries from the tech team via PM. If I do not reply, please email me.
For others, please be sure what you are doing. I am a software developer and I know how to tinker with codes, databases, etc. I will NOT be responsible for any damage to your forum or gallery because you tried to do what I describe in this post. Best to get help from the vbGallery techs.
Please do not PM me for help. I am swamped by my own work, plus I do not know enough of vbGallery.
|
| |
November 23rd, 2008, 04:31 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,720
|
You might have a little issue with the upgrade plus your hack
well I think the issue as I see it looking at our code is pretty simply. At the 2.0b2 upgrade we set the upgrade to 2.0 where it should be 2.0.0 and then we did not actually set the version at the end of 2.0
So as I see it you can download the build and compare the install script to see what I did which I think should solve it.
|
| |
November 24th, 2008, 12:04 PM
|
#3 (permalink)
| | Junior Member Verified Customer
Join Date: May 2005
Posts: 21
|
Hi Chuck,
I'm sorry to say this, but it looks like you did not read most of my post. If you did, you would know I have already gone through the install script, figured out the problem and completed my upgrade.
My so-called "hack" is a true plug-in only product for vBulletin and requires no modification to vBulletin nor vbGallery code at all. So the problem is not because of code modifications in my copies of vBulletin and vbGallery. The only modifications are in the templates and those do not affect the installation/upgrade scripts.
The problem seems to be in the install script which is not accounting for a version before or near 2.0B2. At least, that is what my experience with the upgrade is suggesting. I share with you what I did to make it work, so you can figure out the root cause.
In order for my upgrade to happen correctly, I had to change the gallery_version stored in my UNALTERED adv_setting table from '2.0' to '2.0B2'.
Please, I am not here to make trouble. I am just doing my part as a member of the community to share what I went through and report a potential flaw in the install script.
I've done tech support before and I know it's easy to assume that the user did or is doing something wrong. I'm here trying to present my experience and findings as clearly as possible for the benefit of the other users. It is sad for the community that my post is brushed aside as a problem associated with a so-called "hack".
I am still happy to answer any queries from the tech team if they have any.
|
| |
November 24th, 2008, 12:36 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,720
|
Correct you did not understand my reply I assume
From what I saw when I debugged the installer it had nothing to do with some hack. I am merely stating if you where adding stuff before that was not included in some release this could have compounded your issue.
What I saw on the installer is on one upgrade we put the wrong version number (2.0) in the version field when doing the 2.0b2 upgrade and another we forget to put the version number so your actually skipping an upgrade on the 2.0 upgrade.
What I did if you compare your base install script with the one I modified and included in the download is you will see I explicitly added the new version numbers properly after each upgrade so when you finish your database should be updated as when you finish one upgrade it will read the proper version number and go to the next incremented one.
|
| |
November 24th, 2008, 08:31 PM
|
#5 (permalink)
| | Junior Member Verified Customer
Join Date: May 2005
Posts: 21
|
Oh... looks like I'm the idiot here. My sincere apologies.
I did not realise you meant that you have already checked and modified the installer based on my report.
Anyway, I didn't mean the hack affected the installer. What I meant was that since the installer was looking for "vp_wol4vbagallery" in the vBulletin product table, then I assumed what I had was a version before 2.0B2.
Alright, I've wasted enough of your time from serving other customers. Again my sincere apologies for making a stink. Thank you for your patience.
|
| |
November 24th, 2008, 09:05 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,720
|
Have a good evening.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 05:26 AM. | |