User tests: Successful: Unsuccessful:
since 3.5.0/3.5.1
1.) Moved a <div> out of php, so any editor finds the associated </div>
2.) Moved some strings out of a concatenation, then the tag <a> is closed properly.
Review the code
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Code style |
Category | Code style | ⇒ | Layout Code style |
I've merged this PR to the staging and did fix the mentioned comments above. I'm a little confused about "No newline at end of file", because in the actual Joomla coding standard, you'll find a "Files should always end with a blank new line." see 3rd paragraph in https://developer.joomla.org/coding-standards/php-code.html
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-27 08:03:28 |
Closed_By | ⇒ | tkuschel |
Status | Closed | ⇒ | New |
Closed_Date | 2017-02-27 08:03:28 | ⇒ | |
Closed_By | tkuschel | ⇒ |
Status | New | ⇒ | Pending |
This behavior still exists in Joomla 3.7.1
I have tested this item
The warnings/errors mentioned above are not shown any more but there are some warnings which may create errors for some reasons. Every attribute of a <div> should be distanced with a wide space from the others, e.g. in line 140 should be a space between _preview_img" and '. In line 141 is the same problem.
In common it is more comfortable to separate php and HTML-Code. Please avoid echo"<div>...</div>" or something like this. For example line 160-163 should stand in php-brackets instead of using echo. If this is not an option because you need the value of a php-variable you can use the shorter form of echo which is <?= $variable ?>. Line 160 to 163 can look like:
?>
<div class="media-preview add-on" style="height:auto">
<?= ' ' . $previewImgEmpty ?>
<?= ' ' . $previewImg ?>
</div>
<?php
If you try to write your code like this, you'll see that errors will be found more easily because HTML is clearly separated.
I have tested this item
Without patch:
With patch:
Warnings from above are resolved.
But no merge possible. Tested via com_patchtester.
@icampus
@Heggi93 can you please retest?
There are obvious errors in this patch.
@infograf768 you mean conflicting Files?
Not only. See comment above.
It has been a year since the last update and there are conflicts. I am going to close this at this time - it can always be reopened if updated
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-08 22:31:57 |
Closed_By | ⇒ | brianteeman | |
Labels |
Added:
Conflicting Files
|
@tkuschel Please fix mentioned comment in PR and at the end there is an error of "No newline at end of file", fix this too.
So we can test it.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/9753.