Skip to content

Fix global value for Image Class missing from Figure Class in Articles site module#47490

Open
Chitrakshi180706 wants to merge 2 commits intojoomla:6.1-devfrom
Chitrakshi180706:fix/image-class-global-value-missing
Open

Fix global value for Image Class missing from Figure Class in Articles site module#47490
Chitrakshi180706 wants to merge 2 commits intojoomla:6.1-devfrom
Chitrakshi180706:fix/image-class-global-value-missing

Conversation

@Chitrakshi180706
Copy link
Copy Markdown

@Chitrakshi180706 Chitrakshi180706 commented Mar 28, 2026

Pull Request resolves #47335 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

When 'Use Global' is selected for Image Class in the Articles
module, the global value was not being applied to the figure tag.
The code was checking if float_intro was empty, but 'Use Global'
is not empty — it's a literal string. Fixed by also checking if
the value equals 'Use Global' and fetching the actual global
value in that case.

Testing Instructions

  1. Set a default Image Class in Articles e.g. "image-intro"
  2. Use the Articles site module
  3. Set Image Class to "Use Global"
  4. Check the HTML output
  5. Figure tag should now include the global image class

Actual result BEFORE applying this Pull Request

(global image class missing)

Expected result AFTER applying this Pull Request

(global image class applied correctly)

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • [✅] No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • [✅] No documentation changes for manual.joomla.org needed

…s site module

When 'Use Global' is selected for Image Class, the value was not
being applied to the figure tag because the code was using the
literal string 'Use Global' instead of fetching the actual global value.

Fixes joomla#47335
@brianteeman
Copy link
Copy Markdown
Contributor

Your branch is 6.1 but you are trying to merge it into 5.4

And you must complete the ai check confirmation

@Chitrakshi180706 Chitrakshi180706 changed the base branch from 5.4-dev to 6.1-dev March 28, 2026 16:49
@Chitrakshi180706
Copy link
Copy Markdown
Author

Thank you for the feedback @brianteeman!

I have updated the base branch to 6.1-dev and confirmed
the AI policy check. Sorry for the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global value for Image Class missing from Figure Class in Articles site module

3 participants