Moodle

Wiki will not display image if filename contains uppercase characters in certain positions

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8, 1.9, 1.9.11
  • Fix Version/s: None
  • Component/s: Wiki (1.x)
  • Environment:
    Windows, Linux (Ubuntu)
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

If an image is added to a wiki page, either using the image dialog in the HTML editor, or by adding an <img> element to the HTML code, then that image will not display if the image filename matches this pattern:

^[A-Z][^A-Z][A-Z][^A-Z].*

In other words, any filename that starts with one or more uppcase letters, and also contains another group of one or more uppercase letters anywhere except at the end, will fail to display.

So this is OK:
ABCd_efg_hIJK.jpg

but this fails:
ABCd_eFG_hIJK.jpg

What happens is that the <img> element is output, but the src attribute is omitted.

Bizzare!

Issue Links

Activity

Hide
David Hammond added a comment -

I can confirm this. We had many images which would not display (they were missing the src attribute when the wiki was viewed), and renaming them to start with a lowercase letter fixed the problem. The nonworking filenames matched the above pattern.

Show
David Hammond added a comment - I can confirm this. We had many images which would not display (they were missing the src attribute when the wiki was viewed), and renaming them to start with a lowercase letter fixed the problem. The nonworking filenames matched the above pattern.
Hide
Paul Ortman added a comment -

Using version 1.9.3+ we ran into the same issue. Our non-working filenames also matched the above pattern. Additionally, we experienced that within the HTML editor, everything was working and showing up correctly. It was only when the page was saved and viewed that the src attribute was stripped from images. When re-editing the page, the images would be displayed and could be edited.

Show
Paul Ortman added a comment - Using version 1.9.3+ we ran into the same issue. Our non-working filenames also matched the above pattern. Additionally, we experienced that within the HTML editor, everything was working and showing up correctly. It was only when the page was saved and viewed that the src attribute was stripped from images. When re-editing the page, the images would be displayed and could be edited.
Hide
Jim Daly added a comment -

Not only does this problem apply to file names of the images, it also applies to the names of the folders where they are stored. An image stored in the folder 'Images_Wiki' does not display. The same image moved to the folder 'wiki' does display. We are using 1.8.4

Show
Jim Daly added a comment - Not only does this problem apply to file names of the images, it also applies to the names of the folders where they are stored. An image stored in the folder 'Images_Wiki' does not display. The same image moved to the folder 'wiki' does display. We are using 1.8.4
Hide
Steve Bond added a comment -

Richard Sanders just made a good point on the Moodle-UK mailing list:

"If you are adding pictures using URLs, try turning off camel case linking in the wiki settings... this may solve your problem (the wiki can interpret a web link as camel case which can cause issues)."

Show
Steve Bond added a comment - Richard Sanders just made a good point on the Moodle-UK mailing list: "If you are adding pictures using URLs, try turning off camel case linking in the wiki settings... this may solve your problem (the wiki can interpret a web link as camel case which can cause issues)."
Hide
Kenneth Newquist added a comment -

I'll add to the mix that it will also fail with an image that starts with numbers and then includes a lower case letter. e.g.: almost any image link on Flickr.

Disabling camelcase fixed the problem.

Ken

Show
Kenneth Newquist added a comment - I'll add to the mix that it will also fail with an image that starts with numbers and then includes a lower case letter. e.g.: almost any image link on Flickr. Disabling camelcase fixed the problem. Ken
Hide
Tobias Marx added a comment -

Just wanted to add, that this happens with general links, too. E.g. "http://www.e-teaching.org/didaktik/gestaltung/visualisierung/textbild/Lernen_mit_Text_und_Bild.pdf" will be removed from the wiki's page presentation.

In my opinion this is not just a "minor" bug!

Show
Tobias Marx added a comment - Just wanted to add, that this happens with general links, too. E.g. "http://www.e-teaching.org/didaktik/gestaltung/visualisierung/textbild/Lernen_mit_Text_und_Bild.pdf" will be removed from the wiki's page presentation. In my opinion this is not just a "minor" bug!
Hide
Tobias Marx added a comment -

Just wanted to add, that deactivating camel case in the wiki's settings will fix the problem.

Show
Tobias Marx added a comment - Just wanted to add, that deactivating camel case in the wiki's settings will fix the problem.
Hide
William H Emmons added a comment -

Just a quick reminder that the camelcase setting is only displayed when you click the "Show Advanced" button. I had trouble finding it a first. It is under the General section: Wiki auto-linking options: Disable CamelCase linking. It default to NOT checked.

Show
William H Emmons added a comment - Just a quick reminder that the camelcase setting is only displayed when you click the "Show Advanced" button. I had trouble finding it a first. It is under the General section: Wiki auto-linking options: Disable CamelCase linking. It default to NOT checked.

People

Dates

  • Created:
    Updated: