Atom feed incorrectly formatting codebox?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
RichardRussell
Registered User
Posts: 14
Joined: Sat Mar 28, 2020 6:05 pm

Atom feed incorrectly formatting codebox?

Post by RichardRussell »

I know it's wrong to post a bug report here, but I'm not certain that this isn't simply something I'm misunderstanding. In the Atom feed from my forum [code][/code] blocks are being mis-formatted so that all the lines are strung together as one long line, thus:

Code: Select all

<div class="codebox"><p>CODE: </p><pre><code>      TIME = 0      FOR I% = 1 TO 10000000        a = PI      NEXT      PRINT TIME      TIME = 0      FOR I% = 1 TO 10000000        LET a = PI      NEXT      PRINT TIME</code></pre></div>
Obviously this makes it very hard to read (or copy) when rendered. Is this a bug that I should be reporting, or my misunderstanding, or what? The version of phpBB is 3.3.0, but I can't see anything in the changelog that would suggest it has been fixed since.
RichardRussell
Registered User
Posts: 14
Joined: Sat Mar 28, 2020 6:05 pm

Re: Atom feed incorrectly formatting codebox?

Post by RichardRussell »

RichardRussell wrote: Mon May 30, 2022 3:56 pm In the Atom feed from my forum [code][/code] blocks are being mis-formatted so that all the lines are strung together as one long line
Does nobody have any idea? Surely my forum can't be the only one to be affected by this?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 24570
Joined: Fri Aug 29, 2008 9:49 am
Contact:

Re: Atom feed incorrectly formatting codebox?

Post by Mick »

Does FAQ: phpBB ATOM feeds throw any light on it? It’s from a 3.0 KB though.
RichardRussell wrote: Tue May 31, 2022 1:08 pmSurely my forum can't be the only one to be affected by this?
Did you write the code yourself?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
RichardRussell
Registered User
Posts: 14
Joined: Sat Mar 28, 2020 6:05 pm

Re: Atom feed incorrectly formatting codebox?

Post by RichardRussell »

Mick wrote: Tue May 31, 2022 1:24 pm Does FAQ: phpBB ATOM feeds throw any light on it?
I don't see anything there specifically relating to [code][/code] blocks.
Did you write the code yourself?
What code? It's a standard forum setup and the standard out-of-the-box phpBB Atom feed.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 24570
Joined: Fri Aug 29, 2008 9:49 am
Contact:

Re: Atom feed incorrectly formatting codebox?

Post by Mick »

I wondered where the code you posted in the OP came from.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
RichardRussell
Registered User
Posts: 14
Joined: Sat Mar 28, 2020 6:05 pm

Re: Atom feed incorrectly formatting codebox?

Post by RichardRussell »

Mick wrote: Tue May 31, 2022 3:21 pm I wondered where the code you posted in the OP came from.
If you mean the code in the [code][/code] block, I don't see the relevance of where that came from. It's BASIC code, as it happens, but it could have been anything: the whole point is that it is arbitrary plain-text that must not be reformatted - which is why it's (correctly) put in <pre></pre> tags in the XML Atom feed.

The misbehaviour has the 'feel' that somebody has concluded that line breaks in the XML are unimportant and has removed them, or reformatted the entire XML to have longer lines, or something. But if that is the case anything within <pre></pre> tags must be left unchanged, including line breaks.

If this is looking like a genuine bug in phpBB, shall I report it at the issue tracker site?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 24570
Joined: Fri Aug 29, 2008 9:49 am
Contact:

Re: Atom feed incorrectly formatting codebox?

Post by Mick »

It can’t do any harm.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
RichardRussell
Registered User
Posts: 14
Joined: Sat Mar 28, 2020 6:05 pm

Re: Atom feed incorrectly formatting codebox?

Post by RichardRussell »

Mick wrote: Tue May 31, 2022 4:20 pm It can’t do any harm.
I think I've successfully created an issue at the tracker, but it hasn't yet been assigned or received any comments. So I don't even know if it's acknowledged as being a bug.

Meanwhile I'd be very keen to fix the problem with a patch, if it's possible, but I don't know php so it's not something I could attempt myself. If somebody is prepared to give it a go, I would be more than happy to pay.
RichardRussell
Registered User
Posts: 14
Joined: Sat Mar 28, 2020 6:05 pm

Re: Atom feed incorrectly formatting codebox?

Post by RichardRussell »

RichardRussell wrote: Fri Jun 03, 2022 9:40 pm I think I've successfully created an issue at the tracker
I'm rather bemused by this bug-reporting business. Although, seemingly, I've successfully raised it as an issue, nothing has happened since. Is there something else I'm supposed to do, or is it considered too unimportant to fix, or what?
User avatar
david63
Registered User
Posts: 20611
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Atom feed incorrectly formatting codebox?

Post by david63 »

RichardRussell wrote: Sun Jun 26, 2022 10:40 pm I'm rather bemused by this bug-reporting business. Although, seemingly, I've successfully raised it as an issue, nothing has happened since. Is there something else I'm supposed to do, or is it considered too unimportant to fix, or what?
You have done nothing wrong - it is just a matter of time for someone to look at it and decide what needs to be done. You have to bear in mind that everyone working on phpBB are volunteers doing this in their spare time.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
HaioPaio
Registered User
Posts: 265
Joined: Mon Jan 08, 2018 7:39 pm

Re: Atom feed incorrectly formatting codebox?

Post by HaioPaio »

If someone is not satisfied with the developers pace and priorities, it would always be an option to ask for a full refund of the money that was spent in obtaining the phpBB software package.
Last edited by HaioPaio on Mon Jun 27, 2022 12:46 pm, edited 1 time in total.
www.der-räuchertreff.de phpBB 3.3.x php 7.4
RichardRussell
Registered User
Posts: 14
Joined: Sat Mar 28, 2020 6:05 pm

Re: Atom feed incorrectly formatting codebox?

Post by RichardRussell »

HaioPaio wrote: Mon Jun 27, 2022 9:27 am If someone is not satisfied with the developers pace and priorities, it would always be an option to ask for a full refund of the money that was spent
I appreciate the sarcasm, but I did say earlier in the topic that I would be prepared to pay somebody for a patch to fix this issue, which is a major inconvenience for my users. I'm not expecting something for nothing, although I realise that the phpBB developers themselves probably wouldn't be prepared to prioritise a fix in return for payment, even when it is offered.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 24570
Joined: Fri Aug 29, 2008 9:49 am
Contact:

Re: Atom feed incorrectly formatting codebox?

Post by Mick »

If you’re willing to pay make a request in the Wanted! forum.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “phpBB Custom Coding”