Fork me on GitHub

Need help! Tables not being updated or removed!  Bottom

  • I am trying to get the next release of pnFlashGames together, but I am having trouble with my upgrade. The table is not being updated with a new column. I have verified that the SQL statement is correct, I can run it straight on the DB and it works fine. No error is returned, the message says "Module Upgraded" even though no change is made. It's almost like the function isn't running at all. Also, when I remove the module, the tables don't get deleted. The function names are correct and they are in the pninit.php file, just like the template module. I'm not sure what is wrong here, but I can't release this next version till I figure out what's going on.

    Any ideas?

    Thanks.
  • See my reply in this thread.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Lee,

    I think i've spotted the problem straight off (you'll kick yourself). pnversion.php of version 0.5 of the module still says version 0.1. In your upgrade script you attempt to upgrade from versions 0.5 and 0.5.0 but not version 0.1.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • OMG!!! Good catch! Okay, what do you think about the failure to remove the tables when you remove the module?
  • I'll check that one out a bit later. The upgrade one hit me in the face after about 10 seconds. Is the deletion issue in .5, .6 or both?

    One additional comment - all the files in archive have some whitespace after the closing ?>. While this doesn't generally cause a problem it's not good practice.

    -Mark
  • okay wow, good question. No, version 0.5.0 deletes the tables fine, but 0.6 does not.
  • and what really sucks is, it's still not updating!!! I am beginning to think that all these problems are related somehow...
  • i just checked on that whitespace issue. I removed all the whitespace with a text editor. Apparently, WinSyntax adds a newline at the end of the file. Why it does that I have no idea. Unfortunately, that still didn't make the table udate when I upgraded from .5 to .6. I even tried adding cases for text value oldversions like this:
    case '0.1':
    case '0.5':
    case 0.1:
    case 0.5:

    Guess I'll have to switch editors now.
  • Lee,

    I'll take a full look through the module later today - i'd spotted the version problem before even installing the module.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Lee,

    A close examination shows the problem to be related to the line

    Code

    case 0.5.0
    The value 0.5.0 is not numeric and thus needs to be quoted i.e.

    Code

    case '0.5.0':
    I removed this line (and added in 0.1) and the upgrade proceded fine.

    I picked this up by putting in a direct URL to the pninit file (http://yoursite.com/modules/pnFlashGames/pninit.php). A working file should show as a Blank Page. I got a parse error and line number thus narrowing the search.

    This also fixes the delete tables issue as well.

    -Mark
  • Mark, you are the man!!! I can't believe I missed that! Thanks so much for your help. Thanks to you I can post 0.6 today!

    A million thanks from your new American friend.

    -Lee
  • Lee,

    Thanks - pleased to be of assistance. I meant to say earlier nice module. I think I might be using it myself.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Great, well I just posted 0.6! I tested it as a new install and an upgrade from 0.5 and everything is working very well. I also went ahead and bundled the six games at http://5ss.net into the install now, so you don't have to worry about not having any games.

    Thanks again for the help, Mark.
  • By the way, if you would like to download 0.6, you can do so at http://noc.postnuke.com/projects/pnflashgames

    Thanks!
  • 0 users

This list is based on users active over the last 60 minutes.