J3 Issue ?
avatar EmmaPuls
EmmaPuls
22 Mar 2019

What needs to be fixed

In the Random Image Module, there is a line that sets the default width to 100 if the user enters no width.

if ($width == '')
{
    $width = 100;
}

I'm assuming the intended functionality is to set the default width to 100%, however this code is ambiguous and get's interpreted as 100px in Chrome.

Why this should be fixed

Errors like this build up and ambiguous code is bad in general.

How would you fix it

if ($width == '')
{
    $width = "100%";
}

Side Effects expected

Images that users are used to being small will become responsive.

avatar EmmaPuls EmmaPuls - open - 22 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - change - 22 Mar 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Mar 2019
avatar EmmaPuls EmmaPuls - change - 22 Mar 2019
The description was changed
avatar EmmaPuls EmmaPuls - edited - 22 Mar 2019
avatar EmmaPuls EmmaPuls - change - 22 Mar 2019
The description was changed
avatar EmmaPuls EmmaPuls - edited - 22 Mar 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Mar 2019

Thanks for your Suggest, can you make a Pull Request against J4?

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Status New Information Required
avatar JamesNGarrett
JamesNGarrett - comment - 22 Mar 2019

The field in the random image module config is a number type input and it defaults to 100. It is clearly labled 'px'.

This is not an error just very limited in its functionality. The module was written in a time prior to responsiveness.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Status Information Required Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category com_modules
avatar hardik-codes
hardik-codes - comment - 22 Mar 2019

Members is this issue already resolved as suggested by @JamesNGarrett ?

avatar EmmaPuls
EmmaPuls - comment - 22 Mar 2019

I'd be more than happy to update the plugin with responsiveness if it's cool for me to contribute that kind of change? I'm pretty sure I could make it backwards compatible pretty easily.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Mar 2019

if this is for j3 calling @HLeithner

avatar Bakual
Bakual - comment - 22 Mar 2019

"Adding functionality" has to go to J4.
"Fixing bug" (without changing functionality) can go into J3.

avatar EmmaPuls
EmmaPuls - comment - 22 Mar 2019

"Adding functionality" has to go to J4.
"Fixing bug" (without changing functionality) can go into J3.

Truth but devo for my employer. I've already patched up their J3 implementation with a workaround so it's not a problem anyway.

I'll add this to J4 then and do a pull request, cheers.

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar Quy
Quy - comment - 20 May 2019

Related PR #22068 for J4.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 May 2019

Related PR #22068 for J4.

@Quy does this mean something for this Issue?

avatar joomla-cms-bot joomla-cms-bot - change - 4 Jul 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-07-04 07:55:10
Closed_By joomla-cms-bot
avatar alikon alikon - change - 4 Jul 2019
Closed_By joomla-cms-bot alikon
avatar joomla-cms-bot joomla-cms-bot - close - 4 Jul 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 4 Jul 2019

Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/24298

avatar alikon
alikon - comment - 4 Jul 2019

managed in #22068


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

avatar alikon
alikon - comment - 4 Jul 2019

managed in #22068


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

Add a Comment

Login with GitHub to post a comment