PHP7 Compatability

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
Like I said, it all works fine for me, including switching between storage types.

That code (and comment) dates from 12 years ago, I'm not about to go changing it now. :)
But does it display the error message? It should, since that's why there's a comment in your code already. So someone at some point agreed with me, but I guess you're only wanting to make essential changes now.

The data should be deleted from the table once you press "Finalize" on the moving files from the database to the file system. If the data still exists when you try to move it back, the issue is with the finalize step. Make sure the user has delete permission on the database (though I imagine there would have been other problems first.)

Are you using any kind of master/slave database? Maybe they need time to synchronize.
PHP:
           $db->query_write("
               UPDATE " . TABLE_PREFIX . "filedata
                   SET filedata = '',
                       thumbnail = ''
               WHERE filedataid IN (" . implode(",", $attachmentids) . ")
           ");
1. If you move attachments from the database to the file system then the filedata and thumbnail columns are cleared.
2. If you move attachments from the file system to the database then the files are deleted from the file system.

At no point should the filedata table have rows removed while the storage type is being changed.

So the only issue here is that the message displayed doesn't reflect what's actually going on. It's not a major issue, but because it said that there's an "error" I had to check that everything did get relocated correctly.
 
Last edited:

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
2. If you move attachments from the file system to the database then the files are deleted from the file system.
Are you sure? I don't believe it does, I think deleting the unused files is up to you, but it has been a long time since I moved files from the filesystem to the database.
 

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
Are you sure? I don't believe it does, I think deleting the unused files is up to you, but it has been a long time since I moved files from the filesystem to the database.
Yeah, it does. You'll get the following message.
We have completed moving attachments to the database. Presently, the attachments still remain in the filesystem but are being read from the database. If you are sure that the process completed without incident, go ahead and select yes below to remove the attachments from the filesystem.

This step cannot be reversed and may take a few minutes depending on the number of attachments. Please be patient.
 

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
When viewing posting permissions from a thread you'll see a minor issue. Look at the video BB code.

On line 402 of functions_bigthree.php add the following.
PHP:
$videocodeon = !empty($foruminfo['allowvideos']) ? $vbphrase['on'] : $vbphrase['off'];
 

mysiteguy

Devotee
Joined
Feb 20, 2007
Messages
2,990
What happened to these settings in the admincp?

------------------
Click the help icon on the right for more information on each option.
Inactivity/Cookie Based (Deprecated)
Database (no automatic forum marking)
Database (automatic forum marking)
------------------

I realize cookie based marking was going away, but what happened to the two DB options?
 

Paul M

Limeade Addict
Joined
Jun 26, 2006
Messages
3,852
That setting has gone away, it effectively works as "Database (automatic forum marking)".
 

mysiteguy

Devotee
Joined
Feb 20, 2007
Messages
2,990
Something very odd then, get daily returns posts in the previous 24 hours. Get new never returns anything on one site I have running this.
 

Paul M

Limeade Addict
Joined
Jun 26, 2006
Messages
3,852
Just a final reminder really for anyone using these, or planning to.

If you have any PHP7 related bugs, or any bugs related to other changes in 4.2.5 / 3.8.11 you do not have long left to log them.

Remember, if its not in Jira, I probably dont know about it.
RC2 is due in about 10 days, after that the final version is now due around May 10th.
After RC2, any issue will need to be significant to be included in the final version.
 

Paul M

Limeade Addict
Joined
Jun 26, 2006
Messages
3,852
3.8.11 & 4.2.5 Release Candidate 2 have been released earlier today.

These are the final RC versions before the full releases, due the second week of May.
 

Paul M

Limeade Addict
Joined
Jun 26, 2006
Messages
3,852
On a side note, for anyone interested, I have PHP 7.2 running on my php7 test server.

It has a number of changes that definitely upset both vB3 & vB4.
Since I wont be around to create any [official] 4.2.6 or 3.8.12, my guess is they wont ever be updated to run on PHP 7.2**

Of course, PHP 5.6, 7.0 & 7.1 are going to be around for a long time yet.


** If you run with PHP warnings off (as production sites normally do) they probably would be ok.
 
Last edited:

mysiteguy

Devotee
Joined
Feb 20, 2007
Messages
2,990
Question.... do the latest resolve those text area input spacing issues Chrome and Firefox introduced last year when they changed how they handle word-wrap CSS?
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
Question.... do the latest resolve those text area input spacing issues Chrome and Firefox introduced last year when they changed how they handle word-wrap CSS?
I believe latest versions of the browsers fixed their bug. It was never a VB bug.
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
I can demonstrate that it still occurs with the previous beta release.
I had a report otherwise... but I don't use the WYGIWYS editor so it was never an issue for me, personally. I doubt any changes were done to 4.2.4 to "fix" it because it's not a VB issue. Not aware of any work-around that can be implemented that is better than the bug.

The report and other suggestions for resolving the issue in this mod thread: http://www.vbulletin.org/forum/showthread.php?t=323807
 
Last edited:

chown

Aspirant
Joined
Feb 14, 2017
Messages
25
Question.... do the latest resolve those text area input spacing issues Chrome and Firefox introduced last year when they changed how they handle word-wrap CSS?
We changed to the standard editor toolbar, but for the people using the WYGIWYS editor we applied the following workaround.

Search your templates for "editor_contents.css" and change this:
Code:
body,
body.content {
    font: {vb:stylevar content_msg_font};
    color: {vb:stylevar editor_text_color};
    background:{vb:stylevar editor_background};
    margin:0px;
    padding:8px;
}

body.forum {
    font: {vb:stylevar postbit_font};
}
Into this:
Code:
body,
body.content {
    font: {vb:stylevar content_msg_font};
    color: {vb:stylevar editor_text_color};
    background:{vb:stylevar editor_background};
    margin:0px;
    padding:8px;
    animation-fill-mode:forwards;
    animation-name:setnowrap;
    animation-duration:0.1s;
}

@keyframes setnowrap {
    0% {white-space:pre-wrap;}
    100% {white-space:normal;}
}

body.forum {
    font: {vb:stylevar postbit_font};
}
Unlike the fixes mentioned on vbulletin.org this doesn't need you to press the enter key and it doesn't add extra white spaces.
 
Last edited:

mysiteguy

Devotee
Joined
Feb 20, 2007
Messages
2,990
Thank you! I have a big board where there have been a lot of complaints about this issue.
 

Paul M

Limeade Addict
Joined
Jun 26, 2006
Messages
3,852
The final versions of 3.8.11 & 4.2.5 were released earlier today, they conclude the 4.2.5 & 3.8.11 release schedule.
The also conclude my time as Project Manager for vB3 & vB4, and will most likely be the last ever releases for both the 3.x & 4.x series.
 
Last edited:
Top