4.2.3 to 4.2.5 upgrade error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fwulfers
    Senior Member
    • Jul 2010
    • 147
    • 4.2.x

    4.2.3 to 4.2.5 upgrade error

    The site was running on php version 5.6. I first changed the version to 7.1 and then wanted to upgrade vB to 4.2.5. There was an error about half way and the upgrade was aborted. Any thoughts on how to fix this problem and complete the upgrade?

    The site seems to be running fine after the upgrade errors but looked like it nly completed halfway.

    Unexpected Text:

    Code:
    <?xml version="1.0" encoding="windows-1252"?>
    <?xml version="1.0" encoding="windows-1252"?>
    <error><![CDATA[Could not find phrase 'required_field_x_missing_or_invalid'.]]></error>
    Click image for larger version

Name:	image_69692.jpg
Views:	324
Size:	57.6 KB
ID:	4371687

    Click image for larger version

Name:	image_69693.jpg
Views:	227
Size:	64.5 KB
ID:	4371688
    SaabWorld
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24287
    • 6.0.X

    #2
    Try refreshing the page.
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • fwulfers
      Senior Member
      • Jul 2010
      • 147
      • 4.2.x

      #3
      Tried that several times but the error keeps coming back every time.
      SaabWorld

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74123

        #4
        If you run the upgrade under PHP 5.6, does it error out?
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • In Omnibus
          Senior Member
          • Apr 2010
          • 2310

          #5
          Is this a GoDaddy shared server by any chance? They are notorious for timing out on Step 17.

          Comment

          • fwulfers
            Senior Member
            • Jul 2010
            • 147
            • 4.2.x

            #6
            Actually, the site was on php 5.4.

            Same error when switching from 7.1 to 5.6. It is at this step:

            Press the button below to run the Blog Upgrade step

            When I set the site to use 5.4, install/upgrade.php errors out completely:
            Parse error: syntax error, unexpected '*' in public_html/includes/functions.php on line 1576
            SaabWorld

            Comment

            • fwulfers
              Senior Member
              • Jul 2010
              • 147
              • 4.2.x

              #7
              Originally posted by In Omnibus
              Is this a GoDaddy shared server by any chance? They are notorious for timing out on Step 17.
              It's on shared hosting at https://www.040hosting.eu/ . Has been very reliable though the last 6 years.
              SaabWorld

              Comment

              • Paul M
                Former Lead Developer
                vB.Com & vB.Org
                • Sep 2004
                • 9886

                #8
                Originally posted by fwulfers
                Tried that several times but the error keeps coming back every time.
                Unfortunately, this may be a bug in the blog installer (upgrade) code that wasnt spotted at the time.
                I only have limited access to this at work, but it lookes like Step 18 has a couple of hard coded content type ids in a query.

                I'm not sure what effect that will have but it wont be good, and given you are failing on step 18, its quite likely it might be the issue.
                Baby, I was born this way

                Comment

                • Mark.B
                  vBulletin Support
                  • Feb 2004
                  • 24287
                  • 6.0.X

                  #9
                  Originally posted by Paul M

                  Unfortunately, this may be a bug in the blog installer (upgrade) code that wasnt spotted at the time.
                  I only have limited access to this at work, but it lookes like Step 18 has a couple of hard coded content type ids in a query.

                  I'm not sure what effect that will have but it wont be good, and given you are failing on step 18, its quite likely it might be the issue.
                  Is it this bit?
                  Code:
                              SELECT bt.userid, bt.dateline, blogtextid, ipaddress, firstblogtextid
                              FROM " . TABLE_PREFIX . "blog_text bt
                              JOIN " . TABLE_PREFIX . "blog bl USING (blogid)
                              LEFT JOIN " . TABLE_PREFIX . "ipdata ip ON (
                                  bt.ipaddress = ip.ipid AND bt.blogtextid  = ip.contentid
                                  AND bt.userid = ip.userid AND ip.contenttypeid IN ([B][COLOR=#FF0000]29,30[/COLOR][/B])
                              )
                              WHERE ipid IS NULL
                  MARK.B
                  vBulletin Support
                  ------------
                  My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                  My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                  Comment

                  • Paul M
                    Former Lead Developer
                    vB.Com & vB.Org
                    • Sep 2004
                    • 9886

                    #10
                    Yes.

                    Basically they should be the BlogEntry & BlogComment type ids.
                    If you look them up in your database you could just directly replace them.


                    However, that section needs updating ;

                    Replace this ;
                    Code:
                    $records = $this->db->query_read_slave("
                        SELECT bt.userid, bt.dateline, blogtextid, ipaddress, firstblogtextid
                        FROM " . TABLE_PREFIX . "blog_text bt
                        JOIN " . TABLE_PREFIX . "blog bl USING (blogid)
                        LEFT JOIN " . TABLE_PREFIX . "ipdata ip ON (
                            bt.ipaddress = ip.ipid AND bt.blogtextid  = ip.contentid
                            AND bt.userid = ip.userid AND ip.contenttypeid IN (29,30)
                        )
                        WHERE ipid IS NULL
                    ");

                    With this ;
                    Code:
                    [COLOR=#0000CD]$entrytypeid = vB_Types::instance()->getContentTypeID('vBBlog_BlogEntry');
                    $commenttypeid = vB_Types::instance()->getContentTypeID('vBBlog_BlogComment');[/COLOR]
                    
                    $records = $this->db->query_read_slave("
                        SELECT bt.userid, bt.dateline, blogtextid, ipaddress, firstblogtextid
                        FROM " . TABLE_PREFIX . "blog_text bt
                        JOIN " . TABLE_PREFIX . "blog bl USING (blogid)
                        LEFT JOIN " . TABLE_PREFIX . "ipdata ip ON (
                            bt.ipaddress = ip.ipid AND bt.blogtextid  = ip.contentid
                            AND bt.userid = ip.userid AND ip.contenttypeid IN ([COLOR=#0000CD]$entrytypeid,$commenttypeid[/COLOR])
                        )
                        WHERE ipid IS NULL
                    ");

                    The changes are in Blue.
                    Last edited by Paul M; Tue 13 Jun '17, 1:32pm.
                    Baby, I was born this way

                    Comment

                    • Mark.B
                      vBulletin Support
                      • Feb 2004
                      • 24287
                      • 6.0.X

                      #11
                      Many thanks Paul.

                      fwulfers you will need to make that edit. It's in /install/includes/class_upgrade_vbblog.php around line 1957.

                      If you are not comfortable making the edit, please raise a support ticket at www.vbulletin.com/go/techsupport, include a link to this thread and your ftp credentials, and we will make the edit for you.
                      Last edited by Mark.B; Tue 13 Jun '17, 1:37pm.
                      MARK.B
                      vBulletin Support
                      ------------
                      My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                      My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                      Comment

                      • Mark.B
                        vBulletin Support
                        • Feb 2004
                        • 24287
                        • 6.0.X

                        #12
                        Let me get some proper instructions up for this edit:

                        In file:
                        /install/includes/class_upgrade_vbblog.php

                        Find this block of code, around line 1957:
                        PHP Code:
                        $records $this->db->query_read_slave("
                            SELECT bt.userid, bt.dateline, blogtextid, ipaddress, firstblogtextid
                            FROM " 
                        TABLE_PREFIX "blog_text bt
                            JOIN " 
                        TABLE_PREFIX "blog bl USING (blogid)
                            LEFT JOIN " 
                        TABLE_PREFIX "ipdata ip ON (
                                bt.ipaddress = ip.ipid AND bt.blogtextid  = ip.contentid
                                AND bt.userid = ip.userid AND ip.contenttypeid IN (29,30)
                        )
                        WHERE ipid IS NULL
                        "
                        ); 

                        Replace with this:
                        PHP Code:
                        $entrytypeid vB_Types::instance()->getContentTypeID('vBBlog_BlogEntry');
                        $commenttypeid vB_Types::instance()->getContentTypeID('vBBlog_BlogComment');

                        $records $this->db->query_read_slave("
                            SELECT bt.userid, bt.dateline, blogtextid, ipaddress, firstblogtextid
                            FROM " 
                        TABLE_PREFIX "blog_text bt
                            JOIN " 
                        TABLE_PREFIX "blog bl USING (blogid)
                            LEFT JOIN " 
                        TABLE_PREFIX "ipdata ip ON (
                                bt.ipaddress = ip.ipid AND bt.blogtextid  = ip.contentid
                                AND bt.userid = ip.userid AND ip.contenttypeid IN (
                        $entrytypeid,$commenttypeid)
                            )
                            WHERE ipid IS NULL
                        "
                        ); 
                        MARK.B
                        vBulletin Support
                        ------------
                        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                        Comment

                        • fwulfers
                          Senior Member
                          • Jul 2010
                          • 147
                          • 4.2.x

                          #13
                          I changed the code as instructed and it now stops with the following message:

                          (posting a screenshot as it won't format correctly)

                          Click image for larger version

Name:	Untitled.jpg
Views:	221
Size:	142.7 KB
ID:	4371709
                          SaabWorld

                          Comment

                          • Mark.B
                            vBulletin Support
                            • Feb 2004
                            • 24287
                            • 6.0.X

                            #14
                            fwulfers Have you got these two lines of code in as well? They aren't in the original file and need to be in the edited one:

                            PHP Code:
                            $entrytypeid vB_Types::instance()->getContentTypeID('vBBlog_BlogEntry');
                            $commenttypeid vB_Types::instance()->getContentTypeID('vBBlog_BlogComment'); 

                            So that whole block must look like this:

                            PHP Code:
                            $entrytypeid vB_Types::instance()->getContentTypeID('vBBlog_BlogEntry');
                            $commenttypeid vB_Types::instance()->getContentTypeID('vBBlog_BlogComment');

                            $records $this->db->query_read_slave("
                                SELECT bt.userid, bt.dateline, blogtextid, ipaddress, firstblogtextid
                                FROM " 
                            TABLE_PREFIX "blog_text bt
                                JOIN " 
                            TABLE_PREFIX "blog bl USING (blogid)
                                LEFT JOIN " 
                            TABLE_PREFIX "ipdata ip ON (
                                    bt.ipaddress = ip.ipid AND bt.blogtextid  = ip.contentid
                                    AND bt.userid = ip.userid AND ip.contenttypeid IN (
                            $entrytypeid,$commenttypeid)
                                )
                                WHERE ipid IS NULL
                            "
                            ); 
                            MARK.B
                            vBulletin Support
                            ------------
                            My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                            My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                            Comment

                            • fwulfers
                              Senior Member
                              • Jul 2010
                              • 147
                              • 4.2.x

                              #15
                              Yes, I included all the code:

                              Click image for larger version

Name:	Untitled 2.jpg
Views:	205
Size:	99.2 KB
ID:	4371716
                              SaabWorld

                              Comment

                              Related Topics

                              Collapse

                              Working...