Announcement

Collapse
No announcement yet.

4.2.3 to 4.2.5 upgrade error

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

  • Ordovicium
    replied
    Originally posted by Paul M View Post
    Do you have the blogs disabled ?

    You will need to re-enable them for it to run.

    I suspect that may be the reason it was failing before as well (even though that code is also wrong).

    I couldnt see how that mistake was failing like your original report, but if you have the blogs disabled, it makes a little more sense.
    Thank you very much Paul M. You saved me. I activated the Blog within my Product Overview and ran smooth.

    Leave a comment:


  • Paul M
    replied
    The Blogs (& CMS) were never intended to be disabled in that manner, so its not a surprise that doing so creates issues.

    If you dont want to use either one of them then you should just disable access to them in usergroup permissions.

    Of course, if you dont use both then you should just install the forum only version.

    Leave a comment:


  • fwulfers
    replied
    Paul, you were correct about the blogs being disabled. I ran the upgrade again with the blogs enabled and it finished without any issues. I imagine those upgrade scripts are quite complicated and you can't account for everything that may go wrong.

    Thanks everybody for your quick assistance with this problem.

    Leave a comment:


  • Paul M
    replied
    Do you have the blogs disabled ?

    You will need to re-enable them for it to run.

    I suspect that may be the reason it was failing before as well (even though that code is also wrong).

    I couldnt see how that mistake was failing like your original report, but if you have the blogs disabled, it makes a little more sense.
    Last edited by Paul M; Tue 13 Jun '17, 3:11pm.

    Leave a comment:


  • fwulfers
    replied
    Yes, I included all the code:

    Click image for larger version

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

    Leave a comment:


  • Mark.B
    replied
    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
    "
    ); 

    Leave a comment:


  • fwulfers
    replied
    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:	146
Size:	142.7 KB
ID:	4371709

    Leave a comment:


  • Mark.B
    replied
    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
    "
    ); 

    Leave a comment:


  • Mark.B
    replied
    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.

    Leave a comment:


  • Paul M
    replied
    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.

    Leave a comment:


  • Mark.B
    replied
    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 ([B][COLOR=#FF0000]29,30[/COLOR][/B])
                )
                WHERE ipid IS NULL

    Leave a comment:


  • Paul M
    replied
    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.

    Leave a comment:


  • fwulfers
    replied
    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.

    Leave a comment:


  • fwulfers
    replied
    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

    Leave a comment:


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

    Leave a comment:

Related Topics

Collapse

Working...
X