? ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
8 Jan 2022

Pull Request for Issue # .

Summary of Changes

This PR backports the image.php JLayout so Devs could use it even if their extensions are targeting both 3.10 and 4.x

Testing Instructions

in the protostar index.php add before the <Jdoc:include type="component" the following

<?php echo JLayoutHelper::render(
 'joomla.html.image',
 [
 	'src' => JUri:root() . 'images/joomla_black.png',
 	'alt' => 'Some Alt tag',
 ]
); ?>

<?php echo JLayoutHelper::render(
 'joomla.html.image',
 [
 	'src' => JUri:root() . 'iimages/powered_by.png',
 	'alt' => false,
 ]
); ?>

You should be able to see the 2 Joomla banners, one with alt: Some Alt tag and the other one without any alt tag

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

Yes, this needs to be communicated, eg: this is the preferred way to handle images.
I'm preparing something...

@zero-24 this is a backport of #35780

avatar dgrammatiko dgrammatiko - open - 8 Jan 2022
avatar dgrammatiko dgrammatiko - change - 8 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2022
Category Layout
avatar dgrammatiko dgrammatiko - change - 8 Jan 2022
Labels Added: ?
ba9fb76 8 Jan 2022 avatar dgrammatiko CS
avatar laoneo
laoneo - comment - 10 Jan 2022

Getting the following warnings:
Warning: Undefined variable $img in /var/www/html/pr/36613/layouts/joomla/html/image.php on line 21
Warning: Attempt to read property "url" on null in /var/www/html/pr/36613/layouts/joomla/html/image.php on line 21

avatar laoneo
laoneo - comment - 10 Jan 2022

I have tested this item successfully on f05a972

test code is wrong, after i fixed, it worked


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36613.

avatar laoneo laoneo - test_item - 10 Jan 2022 - Tested successfully
avatar Quy
Quy - comment - 10 Jan 2022

I have tested this item successfully on f05a972


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36613.

avatar Quy Quy - test_item - 10 Jan 2022 - Tested successfully
avatar Quy Quy - change - 10 Jan 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 10 Jan 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36613.

avatar zero-24 zero-24 - change - 29 Jan 2022
Labels Added: ?
avatar zero-24
zero-24 - comment - 29 Jan 2022

Merging here thanks :)

avatar zero-24 zero-24 - close - 29 Jan 2022
avatar zero-24 zero-24 - merge - 29 Jan 2022
avatar zero-24 zero-24 - change - 29 Jan 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-29 19:09:25
Closed_By zero-24

Add a Comment

Login with GitHub to post a comment