Feature Language Change PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar rdeutz
rdeutz
11 Oct 2024

In the extension development room someone asked, if content plugins replace custom fields values. The correct answer to the question is: It depends.

If you include a field with {fields x} then it can be be replaced, if the content plugins run in the right order. E.g. I made a text field and set it to {loadmoduleid 17}, if the content/field plugin runs before the content/loadmodules plugin then its gets replaced otherwise not.

If the fields is displayed with "Automatic Display" then it is never replaced.

This feels inconsistent.

I had the idea to add a prepare content parameter to the fields like we have this for a custom module. The we could control the replacement better. Opinions please?

Summary of Changes

I have added a new parameter "Prepare Content" to the custom fileds like we have it for a custom module. I made changes to the FieldsHelper and run content plugins when the parameter is set to yes. The default value for "Prepare Content" is no. This can have an effect to the site performance.

I am not sure if we should add this to the core so I will keep it as draft and let the maintainers make an decision.

Testing Instructions

  • Create a custom field text
  • Create an article and set the custom fields to {loadmoduleid x}; x must be the id of an existing module
  • Add some text to the article and add {field y}; y is the id of the created custom field
  • Set the article to featured
  • Go to the homepage
  • Now apply patch
  • Change the "Prepare Content" to yes

Actual result BEFORE applying this Pull Request

1C4FB475-E975-46EA-9D61-9EBB12565621

or when the ordering of the content plugins is fields -> loadmodules

203C23C9-A9A6-49BF-8C71-FFA39BBB75C9

Expected result AFTER applying this Pull Request

2C00FB79-8325-4960-B685-A06CC63799AA

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar rdeutz rdeutz - open - 11 Oct 2024
avatar rdeutz rdeutz - change - 11 Oct 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2024
Category Administration com_fields Language & Strings
avatar rdeutz rdeutz - change - 11 Oct 2024
The description was changed
avatar rdeutz rdeutz - edited - 11 Oct 2024
avatar rdeutz rdeutz - change - 11 Oct 2024
Labels Added: Feature Language Change PR-5.3-dev

Add a Comment

Login with GitHub to post a comment