Skip to content

Conversation

@Eriiond
Copy link
Contributor

@Eriiond Eriiond commented Nov 25, 2014

I changed the template how Joomla renders the fields in an backend edit view. In detail, the template generates a div-element with the css class "control-group ". Always with an additional space at the end of the css class "control-group".

My fix sets the css class to "control-group" if there is no additional css class. (without the additional space) else the space is added.

Use the 'renderFieldset' function in the 'JForm' class, Joomla uses the layout in renderfield.php to create the form fields.

The output of this method is not the same as in the Joomla core extensions. This fix makes the output consistent with the Joomla core extension template.

How to test (edit by @zero-24 )

  • Access a article and e.g. use Firebug to see the HTML Code for a renderd field.
  • apply this patch e.g. vie com_patchtester
  • see the same field again
  • see the image above.

@brianteeman
Copy link
Contributor

Please provide a description of what you have changed, What the problem is that you re trying to resolve and how people can test it. Otherwise this will be closed. Thanks

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

@Eriiond
Copy link
Contributor Author

Eriiond commented Dec 2, 2014

I changed the template how Joomla renders the fields in an backend edit view. In detail, the template generates a div-element with the css class "control-group ". Always with an additional space at the end of the css class "control-group".

My fix sets the css class to "control-group" if there is no additional css class. (without the additional space) else the space is added.

Use the 'renderFieldset' function in the 'JForm' class, Joomla uses the layout in renderfield.php to create the form fields.

The output of this method is not the same as in the Joomla core extensions. This fix makes the output consistent with the Joomla core extension template.

@zero-24
Copy link
Contributor

zero-24 commented Dec 5, 2014

@test successful Result is:
screen shot 2014-12-05 at 16 07 33

How to test

  • Access a article and e.g. use Firebug to see the HTML Code for a renderd field.
  • apply this patch e.g. vie com_patchtester
  • see the same field again
  • see the image above.

Thanks @Wolf-Rost only one more tester is needed here.

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

@zero-24
Copy link
Contributor

zero-24 commented Dec 5, 2014

Travis fails with this error The command "composer update" failed and exited with 255 during . this has nothing to do with the current changed code.

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

@brianteeman
Copy link
Contributor

@test I can confirm the issue
<div class="control-group " >

After applying the patch I can see that the space before the " has now gone but the space after it has not (unlike @zero-24 screenshot
<div class="control-group" >
shouldn't it look like
<div class="control-group">


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

@zero-24
Copy link
Contributor

zero-24 commented Jan 3, 2015

@brianteeman can you say where you see it? On which fields / views?

Can you try com_content --> "your itm" --> Options as reference? (<- That work for me)

@zero-24
Copy link
Contributor

zero-24 commented Jan 3, 2015

$displayData['options']['class']; ?>" <?php echo $displayData['options']['rel'];

Maybe this is realted to this here? (Note the space beteween the ?>" and <?php)

Can you test this in your view as i can't reproduce this?

@brianteeman
Copy link
Contributor

I was testing
administrator/index.php?option=com_content&view=article&layout=edit&id=1

You have to test with view source not inspect element


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

@zero-24
Copy link
Contributor

zero-24 commented Jan 3, 2015

Thanks @brianteeman that does the trick. I can confirm your findings and the fix.

@Wolf-Rost can you also remove the space beteween the ?>" and <?php here: $displayData['options']['class']; ?>" <?php echo $displayData['options']['rel'];

So we can move this forward.

@brianteeman
Copy link
Contributor

Its confusing that the developer tools like chrome inspector and firebug
are not displaying the actual source but a tidied version of it.

On 3 January 2015 at 11:59, zero-24 [email protected] wrote:

Thanks @brianteeman https://github.com/brianteeman that does the trick.
I can confirm your findings and the fix.

@Wolf-Rost https://github.com/Wolf-Rost can you also remove the space
beteween the ?>" and "

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

@infograf768
Copy link
Member

can you also remove the space beteween the ?>" and " <?php echo $displayData['options']['rel'];

Wondering when $displayData['options']['rel'] is used, as taking off that space could create an issue when it is.

@zero-24
Copy link
Contributor

zero-24 commented Jan 4, 2015

hmm ok so we can fix it like the first? @infograf768

<div class="control-group<?php echo empty($displayData['options']['class']) ? "" : " " . $displayData['options']['class']; ?>"<?php echo empty($displayData['options']['rel']) ? "" : " " .  $displayData['options']['rel']; ?>>

@infograf768
Copy link
Member

Yep and this PR has to be redone towards staging.

@jissues-bot
Copy link

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

@zero-24
Copy link
Contributor

zero-24 commented Jan 4, 2015

done @infograf768

@Wolf-Rost can you have a look into the new PR (#5610) and test it?

If you need help by applying a patch you can use the com_patchtester from: https://github.com/joomla-extensions/patchtester/releases Docs: https://docs.joomla.org/Component_Patchtester_for_Testers

Thanks!

Closing here in four of the new PR against staging: #5610


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

@jissues-bot jissues-bot closed this Jan 4, 2015
@joomla joomla deleted a comment from rummybocom Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants