How center an image in post??

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: How center an image in post??

Post by M.O.B. » Tue Apr 18, 2017 12:27 am

JoshyPHP wrote:
Tue Apr 18, 2017 12:15 am
Try a clean install on your own server. There is something wrong on your side and nobody can help you with that. Maybe you have an extension that replaces the good [center] BBCode or [centre] BBCode or whatever BBCode you use to center things, maybe you think you're doing something but you're actually doing something else, maybe there is a rare condition in a cache somewhere that makes your board use the wrong HTML. Either way, this is something that is specific to your setup.
You are on to something there. :)

During my tests on my offline board, I was only working on my old topics that were done using phpBB 3.1.10. I would simply try to resubmit the post that had the attachment and also the center bbcode.

I never tested attaching a new file on a new post or reply.

Well if I create a new post and also a new reply and attach a new file, it will work with the center bbcode (your version or the one I was also using) using the inline attachment.

So then it occurred to me to try this:

UPDATE: I created a flash video on the steps below -

http://www.mixingonbeat.com/media/phpbb ... t_bug.html
  1. Go back to my old posts, and what I do is edit the post and remove this part in the post:

    Code: Select all

    [center][attachment=0]Clipboard02.png[/attachment][/center]
  2. Then I submit the post. (NOTE it doesn't delete the attachment, it simply doesn't try to place the inline attachment.
  3. Then I edit the post again, and this time I add this property again:

    Code: Select all

    [center][attachment=0]Clipboard02.png[/attachment][/center]
  4. And guess what? It works!! :) :) :)
So what is the issue? I dunno? Perhaps reparse the bbcode? Or perhaps something got damaged during the phpBB 3.2 upgrade when upgrading the database? I have no clue!!!! :(

I still have thousands of posts that need fixing, but that's going to take me ages if I have to repeat the steps above. Is there a clue as to why this is happening? I wonder???

Maybe this is a clue???

In older posts with the issue, in the database the centered inline attachment looks like this: (notice how short it is.)

Code: Select all

<r><CENTER><s>[center]</s>[attachment=0]girl-826867_640.jpg[/attachment]<e>[/center]</e></CENTER><br/>
But in newer submitted posts the same centered inline attachment looks like this:

Code: Select all

<r><CENTER><s>[center]</s><ATTACHMENT filename="girl-826867_640.jpg" index="0"><s>[attachment=0]</s>girl-826867_640.jpg<e>[/attachment]</e></ATTACHMENT><e>[/center]</e></CENTER></r>
Could that be the problem?

And in order to fix it, I gotta remove the old center inline attachment from the post and then submit, then edit the post and re-add it?

I'm hoping if you guys can spot where the error is. Why was it necessary for the inline attachment to include so much extra data???
Last edited by M.O.B. on Tue Apr 18, 2017 1:13 am, edited 1 time in total.
Image

User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: How center an image in post??

Post by M.O.B. » Tue Apr 18, 2017 1:11 am

UPDATE:

I created a flash video to show the steps on how I am able to make the center bbcode work on old posts with this issue: http://www.mixingonbeat.com/media/phpbb ... t_bug.html

Please read my previous post and look at the difference between the data inside the database with the old and new attachment bbcode properties. viewtopic.php?p=14716736#p14716736

Is there a way I can fix all my posts in batch or mass way? Can we re-parse bbcode?

UPDATE:

I was able to fix my issue, but doing the BBCODE REPARSE feature using an unofficial version of STK for phpBB 3.2: https://github.com/AlexSheer/phpBB3.2-STK

I think phpBB should have a built-in BBCODE REPARSE feature. That should be the way to fix these weird issues.

But the problem still remains for others. I am positive that other members that upgraded from phpBB 3.1.x to 3.2 will have this issue if they used "center" bbcode and inline image attachments. :(
Image

User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: How center an image in post??

Post by M.O.B. » Tue Apr 18, 2017 3:34 am

UPDATE:

After being able to fix my issue (using STK), I restored my database, because I found another bug.

Well that led me to why I had the first bug in the first place.

It seems that all my old posts that have this issue with the center inline attachment have the following code inside the POLL QUESTION text box. -- Even though, those topics never had an active poll in the first place.

Code: Select all

<t></t>
poll question.png
Well, if I remove just that POLL QUESTION text <t></t>, and submit my old post, the attachments will appear centered and everything. So this might be the reason why I had this issue?

I have no idea why that text is being placed in there? Anyone? It seems it is in my database -- I guess after the upgrade from phpBB 3.1.10 to 3.2?? -- NOTE: in my old phpBB 3.1.10 the poll_title columns don't have that strange code.

I then checked my database and under the phpbb_topics table I see them in the poll_title column (see screenshot).
database.png
I plan to do a MYSQL run and find and remove that code inside that column.

Code: Select all

update phpbb_topics set poll_title = replace(poll_title, '<t></t>', '');
Also, I got another question.

In phpBB 3.2 database, is it a new thing to see the following:

Code: Select all

<t>white?</t>
under the poll_option_text column under the poll_options table?

They all seem to have the <t>TEXT</t> format:
Clipboard06.png
On a side note, where is the LOCKED POSTS or LOCKED TOPICS column in the database? I also found a bug with that, it seems that when I BBCode REPARSE some of my topic get locked. Weird stuff. Maybe there is some code there also I don't want. lol

I hope you guys help me figure this out? I think it has something to do with the phpBB 3.1.10 to 3.2 database update?
Image

User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: How center an image in post??

Post by M.O.B. » Tue Apr 18, 2017 7:15 am

UPDATE:

I started a new TRACKER TICKET about the new bug I think I found that relates to the bug I had above in my database: https://tracker.phpbb.com/browse/PHPBB3-15181
Image

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17026
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: How center an image in post??

Post by DavidIQ » Tue Apr 18, 2017 10:47 am

M.O.B. wrote:
Tue Apr 18, 2017 3:34 am
It seems that all my old posts that have this issue with the center inline attachment have the following code inside the POLL QUESTION text box. -- Even though, those topics never had an active poll in the first place.

Code: Select all

<t></t>
Expected, not a bug and not causing any harm.
M.O.B. wrote:
Tue Apr 18, 2017 3:34 am
In phpBB 3.2 database, is it a new thing to see the following:

Code: Select all

<t>white?</t>
under the poll_option_text column under the poll_options table?
Yes. 3.2 uses a new and more advanced message parser. These "tags" in their various definitions replace the tokens we stored before. They get replaced with valid HTML when displaying all sorts of text.
M.O.B. wrote:
Tue Apr 18, 2017 3:34 am
On a side note, where is the LOCKED POSTS or LOCKED TOPICS column in the database? I also found a bug with that, it seems that when I BBCode REPARSE some of my topic get locked. Weird stuff. Maybe there is some code there also I don't want. lol

I hope you guys help me figure this out? I think it has something to do with the phpBB 3.1.10 to 3.2 database update?
Topic_status is the column in the topics table. You used a third party tool that we don't support to do this and there hasn't been any reports of issues with this so I'd point the finger at this tool.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
M.O.B.
Registered User
Posts: 927
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: How center an image in post??

Post by M.O.B. » Tue Apr 18, 2017 8:18 pm

Ah! Thanks. Glad the <t></t> in the database isn't a bug. :)

But I still wonder why that data was showing up on my POLL TITLES text line:
poll question.png
Causing dummy polls in post that never had a poll.

This was before running the STK tool.

Plus also showing in existing polls the following:

Code: Select all

<t>NAME OF POLL</t>
All my existing polls had that format and it would be seen on the thread.
Image

Post Reply

Return to “[3.2.x] Support Forum”