BBCode issue makes posts empty and appear only if code is disabled.

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
EgyptWrite
Registered User
Posts: 11
Joined: Fri Aug 09, 2019 6:01 am

BBCode issue makes posts empty and appear only if code is disabled.

Post by EgyptWrite »

website link: egyptwrite.com/w
sample of impacted posts: http://egyptwrite.com/w/viewtopic.php?t=1201
PHP version : PHP Version 7.2.34
PHPBB version: 3.3.11

The issue is the posts are not showing at all as if it's empty, but if you check the source of the page you will find the content written there, also if you clicked on edit for the same post you will find the text along with lots of messed up bbcode, the only way to show it in a post view, is if you edit and disabled bbcode then sumitted, but of course it will show with all the messed up code, not the text alone. I wish if there is any solution to solve the issue for all posts cause manual edit to each post to remove the code by hand is almost impossible.

worth to note that I was using the infamous Almsamim wysiwyg but I'm not sure if it's related to that or not, I have cleared my forum from it long ago but it may have left an impact.

The pictures below describe the issue after trying to edit the empty post:
Capture1.PNG
Capture2.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
Mannix_
Registered User
Posts: 2046
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by Mannix_ »

your bbcode [size=3] makes the text font size have value of 3% so it's super tiny :) so you gotta change that value from 3 to a much higher number :)
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26882
Joined: Fri Aug 29, 2008 9:49 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by Mick »

You don’t say if everything was ok before this happened, were you doing anything just before it happened that may have caused it? Has it been ok since you removed Almsamim? I also note it’s not all forums, topics and posts.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
Egypt Write
Registered User
Posts: 40
Joined: Wed Apr 15, 2009 2:22 pm

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by Egypt Write »

Mick wrote: Wed Nov 08, 2023 2:31 pm You don’t say if everything was ok before this happened, were you doing anything just before it happened that may have caused it? Has it been ok since you removed Almsamim? I also note it’s not all forums, topics and posts.
Unfortunately it's hard to track what went wrong and when. The forum was heavily modded aside from almasmim, so to get the least damage I did a restore to an old backup but that was many years back. I believe the empty posts issue started after upgrade to 3.x.x versions.

And yes I noticed it's only happening in posts where personalized fonts were used(maybe from.almsamim days)
But any post that was written on default format is showing perfectly fine.
Egypt Write
Registered User
Posts: 40
Joined: Wed Apr 15, 2009 2:22 pm

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by Egypt Write »

Mannix_ wrote: Wed Nov 08, 2023 1:53 pm your bbcode [size=3] makes the text font size have value of 3% so it's super tiny :) so you gotta change that value from 3 to a much higher number :)
Maybe that was part of almasmim mod code, is there a way to fix it in bulk for impacted posts only ? Cause posts written in normal default font are working fine.
EgyptWrite
Registered User
Posts: 11
Joined: Fri Aug 09, 2019 6:01 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by EgyptWrite »

Mick wrote: Wed Nov 08, 2023 2:31 pm You don’t say if everything was ok before this happened, were you doing anything just before it happened that may have caused it? Has it been ok since you removed Almsamim? I also note it’s not all forums, topics and posts.
@mick any solution you have in mind?
User avatar
warmweer
Jr. Extension Validator
Posts: 12007
Joined: Fri Jul 04, 2003 6:34 am
Location: somewhere in the space-time continuum

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by warmweer »

One thing you could try is to edit the posts in the database
e.g. change [size=3] to [size=x]where x is the size you want.
You might have to reparse posts after doing that.

BUT: before editing the database, take a database backup just in case.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
EgyptWrite
Registered User
Posts: 11
Joined: Fri Aug 09, 2019 6:01 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by EgyptWrite »

warmweer wrote: Wed Nov 22, 2023 11:23 am One thing you could try is to edit the posts in the database
e.g. change [size=3] to [size=x]where x is the size you want.
You might have to reparse posts after doing that.

BUT: before editing the database, take a database backup just in case.
@warmweer Thank you. but do you mean there is a bulk way to edit the posts in the database? or one by one?
and what is the default PHPBB font size for normal text (not a header or title)?
Also, is there a way to remove the extra BB code altogether from all posts, not just size, but color and everything. so that all topics and replies would show up normally.
User avatar
warmweer
Jr. Extension Validator
Posts: 12007
Joined: Fri Jul 04, 2003 6:34 am
Location: somewhere in the space-time continuum

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by warmweer »

EgyptWrite wrote: Thu Nov 23, 2023 6:10 am @warmweer Thank you. but do you mean there is a bulk way to edit the posts in the database? or one by one?
The fact that you ask this question almost implies you shouldn't even try it until you can
a) identify exactly which parts of the values in the field post_text need to be edited/removed
b) write the correct SQL
something like UPDATE phpbb_posts SET post_text = REPLACE(post_text, 'a string', 'another string')
c) if something goes wrong, figure it out yourself

That's something I usually (actually very seldom) do in various stages and would need some investigation beforehand.

There's 1 rule you should never break: never work on the database without having a backup (and take regular backups when parts have been fixed
EgyptWrite wrote: Thu Nov 23, 2023 6:10 am and what is the default PHPBB font size for normal text (not a header or title)?
common.css

Code: Select all

body {
	font-family: Verdana, Helvetica, Arial, sans-serif;
	font-size: 10px;
EgyptWrite wrote: Thu Nov 23, 2023 6:10 am Also, is there a way to remove the extra BB code altogether from all posts, not just size, but color and everything. so that all topics and replies would show up normally.
Yes, but again (as in the first part of my reply) it's not an easy task.
Some BBcodes actually format text without which the strings wouldn't make any sense (e.g. lists)

How many posts does your board have?
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
EgyptWrite
Registered User
Posts: 11
Joined: Fri Aug 09, 2019 6:01 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by EgyptWrite »

14948 Post
Thanks for the reply, I understand it won't be easy and needs a lot of caution.
Last edited by Mick on Thu Nov 23, 2023 11:58 am, edited 1 time in total.
Reason: Removed unnecessary full quotes.
EgyptWrite
Registered User
Posts: 11
Joined: Fri Aug 09, 2019 6:01 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by EgyptWrite »

warmweer wrote: Thu Nov 23, 2023 10:16 am
I believe there is an issue in the database itself, I can't see post text in DB, it just shows:

Code: Select all

<t></t>

psdbissue.PNG
for all posts even though the text issue is not happening in all posts. what may be the reason for this? and is there a fix for the empty posts issue with this < t > issue without affecting the working posts?

also If you are providing such paid service kindly let me know
You do not have the required permissions to view the files attached to this post.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26882
Joined: Fri Aug 29, 2008 9:49 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by Mick »

EgyptWrite wrote: Tue Mar 19, 2024 1:48 pmalso If you are providing such paid service kindly let me know
It's not allowed to offer payment in any form for assistance in this forum, but we can help you, for free! If you feel what you want to do is beyond your capability, then please post in the Wanted! forum where you may find someone willing to take on your project.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
EgyptWrite
Registered User
Posts: 11
Joined: Fri Aug 09, 2019 6:01 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by EgyptWrite »

Mick wrote: Tue Mar 19, 2024 4:46 pm
EgyptWrite wrote: Tue Mar 19, 2024 1:48 pmalso If you are providing such paid service kindly let me know
It's not allowed to offer payment in any form for assistance in this forum, but we can help you, for free! If you feel what you want to do is beyond your capability, then please post in the Wanted! forum where you may find someone willing to take on your project.
Apologies, Mick. I didn't know that and absolutely meant no disrespect.
well, to understand if it's beyond my capability or not, is the <t></t> code in DB as above, a usual thing? and is it normal to have that in DB and still have the post showing normally in my forum?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26882
Joined: Fri Aug 29, 2008 9:49 am

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by Mick »

In your first post you gave us an example of what you’re seeing in the page source. Did you try editing that and seeing if it fixes the issue? Don’t forget to reparse the posts.
EgyptWrite wrote: Thu Nov 23, 2023 11:10 amI understand it won't be easy and needs a lot of caution
If it were me I’d install a personal web server following Knowledge Base - Installing and Setting Up Your Own Web Server. Then I’de make backups of all the files and database as per Knowledge Base - Forum Backup Instructions and put them somewhere safe. Then I’de follow Knowledge Base - Transferring Your Board to a New Host or Domain to install your board to the PWS. You can then make another copy of the db in sql (text) format and save it to your desktop then, with a GOOD text editor like Notepad++, you can carry out a find and replace. Once completed, it shouldn’t take very long, upload the edited sql to the PWS and see if the issue is fixed. If it’s ok you can then decide how to do it on the live board, if it doesn’t no harm done.
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
Talk19Zehn
Registered User
Posts: 917
Joined: Tue Aug 09, 2011 1:10 pm

Re: BBCode issue makes posts empty and appear only if code is disabled.

Post by Talk19Zehn »

Hello, just mentioned additionally. STK - https://github.com/Tatiana5/phpBB3.2-STK
*More informations: https://www.phpbbguru.net/community/vie ... 64&t=42862

Important, therefore
please note that the STK is not a "toy". Always (!) create a DB backup beforehand.

BTW: Notes ...

Admin tools: This category contains tools for the administrator to maintain the board.

On the Fly: Test, try, take a look ...

Removing BBCodes: This allows you to remove incorrect or no longer desired BBCodes in forums and posts. Since the *STK (DEV) may be true, some functions may still work (perhaps) incorrectly, so please ALWAYS make a backup of the database before using it.

If necessary, test in a test board (branch). I don't know if there would be a translation for your required language. Just as it doesn't matter whether it leads/can lead to the result.

Hint: Without guarantee ...

Regards

Edit:
Mentally, I can't judge your case exactly in the history presented.

*) The Ext developers have to test their Ext´s with this PHP / phpBB version before they can release it. ;)

Return to “[3.3.x] Support Forum”