Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16040

Topic Icon with space in filename isn't displayed by viewforum_body.html

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2.8-RC1
    • 3.2.7-RC1
    • Styles
    • None

      When uploading image files to the location specified by documentation, the ACP Topic Icons sections "Add" button successfully lists files which contain a space in the name.  Such image files can be successfully selected and added as Topic Icons, and in viewtopic_body.html the selected Topic Icon is successfully displayed.

      But in viewforum_body.html, the selected Topic Icon isn't being displayed, even though the template is attempting to display it.  The root cause is that the "url()" parameter in the background-image property wasn't surrounded by quotes:

      <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">

      Recommend simply fixing the template by putting quotes inside the url('') parameter, and then grabbing a beer.

       

      If for philosophical or religious affiliation reasons we're against endorsing or supporting the presence of a space in the file name, then instead this should be an ACP Topic Icons bug for allowing the image file with a space in it's name to be successfully enumerated, added, and successfully used everywhere else.

      In addition to not allowing such files to be listed when enumerated from the file system, ideally there would also be a notice placed on the rendered "Add" page, advising "One or more files have been omitted because they do not comply with naming standards" or similar.  Since it will not otherwise be obvious to the administrator why correctly-uploaded files are missing from the list.

      Suppose that also means the documentation page should mention the limitation, so that when following the instructions for how to upload icons, the fact that there can't be spaces in the name are part of those instructions being followed.

       

      User who encountered this issue: https://www.phpbb.com/community/viewtopic.php?f=591&t=2509716

            Hanakin Michael Miday
            EA117 EA117
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: