Announcement

Collapse
No announcement yet.

4.2.3 to 4.2.5 upgrade error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:	59
Size:	57.6 KB
ID:	4371687

    Click image for larger version

Name:	image_69693.jpg
Views:	43
Size:	64.5 KB
ID:	4371688
    SaabWorld

  • #2
    Try refreshing the page.
    MARK.B | vBULLETIN SUPPORT

    TalkNewsUK - My vBulletin 5.5.2 Demo
    AdminAmmo - My Cloud Demo

    Comment


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

      Comment


      • #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 customization and demonstration site.
        vBulletin 5 Documentation - Updated every Friday. Report issues here.
        vBulletin 5 API - Full / Mobile
        I am not currently available for vB Messenger Chats.

        Comment


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

          Comment


          • #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


            • #7
              Originally posted by In Omnibus View Post
              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


              • #8
                Originally posted by fwulfers View Post
                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


                • #9
                  Originally posted by Paul M View Post

                  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 (29,30)
                              )
                              WHERE ipid IS NULL
                  MARK.B | vBULLETIN SUPPORT

                  TalkNewsUK - My vBulletin 5.5.2 Demo
                  AdminAmmo - My Cloud Demo

                  Comment


                  • #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:
                    $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
                    ");

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

                    Comment


                    • #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 13th Jun '17, 1:37pm.
                      MARK.B | vBULLETIN SUPPORT

                      TalkNewsUK - My vBulletin 5.5.2 Demo
                      AdminAmmo - My Cloud Demo

                      Comment


                      • #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

                        TalkNewsUK - My vBulletin 5.5.2 Demo
                        AdminAmmo - My Cloud Demo

                        Comment


                        • #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:	42
Size:	142.7 KB
ID:	4371709
                          SaabWorld

                          Comment


                          • #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

                            TalkNewsUK - My vBulletin 5.5.2 Demo
                            AdminAmmo - My Cloud Demo

                            Comment


                            • #15
                              Yes, I included all the code:

                              Click image for larger version

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

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X