FAQ: Why did my post print as blank? (misused url tag)

Here are summaries and links to discussions for Frequently Asked Questions.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

rjlittlefield
Site Admin
Posts: 23543
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

FAQ: Why did my post print as blank? (misused url tag)

Post by rjlittlefield »

There is a long-standing bug in the phpBB2 forum software that causes a post to print as blank if it contains tags that are misused in certain ways. ... m.php?f=29, but

Code: Select all

[url]http://www.photomacrography.net/forum/viewforum.php?f=29
[/url]
will make the post disappear.

A more subtle form often happens to me when I'm attempting to associate a URL with some other text, for example: "Check in the Frequently Asked Questions forum."

The proper way to code this line (as it's done above) is:

Code: Select all

Check in the [url=http://www.photomacrography.net/forum/viewforum.php?f=29]Frequently Asked Questions forum[/url].
Obviously that works fine.

But the whole post will disappear if the line is mis-coded ever so slightly, for example by forgetting to replace ] by = :

Code: Select all

Check in the [url]http://www.photomacrography.net/forum/viewforum.php?f=29]Frequently Asked Questions forum[/url].
The problem can also be caused by certain special characters used between URL tags. Parentheses are a common example. For example, the following URL will trigger the problem:

Code: Select all

[url]https://en.wikipedia.org/wiki/Lens_(optics)[/url]
In this case the problem can be worked around by replacing the parentheses with their URL-encoded equivalents, %28 and %29, as in:

Code: Select all

[url]https://en.wikipedia.org/wiki/Lens_%28optics%29[/url]
which gives the correct but ugly https://en.wikipedia.org/wiki/Lens_%28optics%29 .

To clean up the visual appearance, you can jump through the additional hoop of using the original form as replacement text for the URL-encoded form:

Code: Select all

[url=https://en.wikipedia.org/wiki/Lens_%28optics%29]https://en.wikipedia.org/wiki/Lens_(optics)[/url]
which gives https://en.wikipedia.org/wiki/Lens_(optics)

(But of course if you mess up the use of that equal sign, the whole post will again print as blank!)


The erroneous blankness also shows up if you press the Preview button, so this is another good argument for always previewing your posts before submitting them.

--Rik

[Edit 2/11/2018 to include the issue with parentheses]

rjlittlefield
Site Admin
Posts: 23543
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

On a related issue, note that the tags have to be wrapped tightly around ... 0&ipos=20
https://youtu.be/aqlHC1awavA [/quote]

--------------------------------------------------------------

No extra spaces, tags do not print, URL's are not underlined and work OK (at least until the link breaks because the page disappears from the internet).

Code: Select all

[url]https://www.menards.com/main/electrical/light-bulbs/halogen-light-bulbs/feit-electric-20-watt-g4-12v-daylight-led-light-bulb/xn20t3/p-1543822037620-c-7479.htm?tid=-5763612060390473010&ipos=20[/url]
[url]https://youtu.be/aqlHC1awavA[/url]
--Rik

Post Reply Previous topicNext topic