michael-milette / moodle-filter_filtercodes

FilterCodes filter for Moodle enables content creators to easily customize and personalize course and site content using plain text tags (no HTML). For premium support, contact us at https://www.tngconsulting.ca/contact
https://moodle.org/plugins/filter_filtercodes
GNU General Public License v3.0
30 stars 42 forks source link

Bug: Before calling format_text(), the content must be processed with file_rewrite_pluginfile_urls() #272

Closed michael-milette closed 9 months ago

michael-milette commented 9 months ago

Prerequisites

What happened?

When I use the {categorydescription} tag, I get the following warning from Moodle if the category description contains an image:

Before calling format_text(), the content must be processed with file_rewrite_pluginfile_urls()

What do you think should have happened?

I expected there to be no warning and that the image would appear.

Steps to reproduce

  1. Put an image into a category description.
  2. Use the {categorydescription} tag in a course.

Screenshots

No response

Moodle version

All versions of Moodle.

Installed Moodle UI Language packs.

If other language(s), please specify

No response

Workaround

Don't put images in category descriptions.

Additional information

No response

System information

Not applicable

Code of Conduct

michael-milette commented 9 months ago

This fix is now available in FilterCodes here on GitHub and will be included in the upcoming release on moodle.org within the next few weeks.