No Code Attached Yet
avatar brianteeman
brianteeman
23 Mar 2022

Steps to reproduce the issue

Create an article and add a full article image. Do not add a class.
image

Visit the site in the front end and view the source of the article

Expected result

<figure class="item-image">
	<img src="...">	</figure>

Actual result

<figure class="left item-image">
	<img src=."..">	</figure>

Note the additional class

Additional comments

Unless you add an actual class to the image then this class of "left" will always be added - even though you have not set it.

Why?

After a lot of digging I discovered that this class is defined in the article options. Buried at the bottom of a page of the artcile editing tab

image

Why?

How would I solve this?

  1. a clean install should not have a value for this class
  2. if/when a default class is set in the options then this should be clearly indicated on the full article image field eg

image

I spent a long time tracking down where this "left" came from and I consider myself an experienced user.

This is not a good experience

avatar brianteeman brianteeman - open - 23 Mar 2022
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Mar 2022
avatar brianteeman
brianteeman - comment - 25 Mar 2022

In J3 this setting resulted in
image

That is what is missing in J4. Some sort of indicator that there is a class being used

avatar brianteeman
brianteeman - comment - 25 Mar 2022

Not only dont you know that there is a global setting being used you dont even know what it is

avatar drmenzelit
drmenzelit - comment - 25 Mar 2022

The solution is to add useglobal="true" on the fields in \administrator\components\com_content\forms\article.xml
I will prepare a PR

avatar brianteeman
brianteeman - comment - 25 Mar 2022

If only it was that easy

avatar drmenzelit
drmenzelit - comment - 25 Mar 2022

grafik

Do you have another idea? Maybe a note where to find the global settings?

avatar drmenzelit drmenzelit - close - 25 Mar 2022
avatar drmenzelit
drmenzelit - comment - 25 Mar 2022

Closing as we have a PR #37368

avatar drmenzelit drmenzelit - change - 25 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-25 09:42:30
Closed_By drmenzelit

Add a Comment

Login with GitHub to post a comment