User tests: Successful: Unsuccessful:
Pull Request for Issue # . Part of the Child template effort
/media/system/scss
npm install
$template->template = 'system';
after line 546 in the file
then visit your local site (eg localhost/)$template->template = 'system';
after line 270 in the file
then visit your administrator part of your local site (eg localhost/administrator)It works exactly as before, the static assets were just moved into the /media
folder
IDK the system templates are supposed to act as fallback if something goes horrible wrong with the current active template (but the fallback is not pretty or functional...)
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Templates (admin) NPM Change Repository Front End Templates (site) JavaScript |
Labels |
Added:
NPM Resource Changed
?
|
You are deleting
administrator/templates/system/images/calendar.png
but it is still referenced here
Yes the reference is fine because in the media/system/images the file already exists. So this pr just removed the duplicate...
Yes the reference is fine because in the media/system/images the file already exists. So this pr just removed the duplicate...
Isn't the path wrong then?
Isn't the path wrong then?
The scss will compile this to url("../images/calendar.png")
which is relative to /media/system/css/general.css
(the 2 dots dictate to go one level up and then use the images/calendar.png
), so I'm pretty sure this is fine
EDIT: btw this is totally FOOBAR. The calendar is not using png images for the icon in J4, in J3 there was an instance in the Beez and the Hathor templates
Can you please confirm the line numbers and changes for the test instructions
@brianteeman oops there was an error in the instructions
I dont seem to be able to trigger the use of the system template
@brianteeman maybe it's easier to comment out the whole public function getTemplate
in both the Site and Administrator apps so the system kicks in (it's the default on the Web app?
It appears to work BUT in your screenshots there is a data-asset-name which i don't get
That's just the extra bits added whenever the debug is enabled. It's fine if you don't have them
I have tested this item
got there in the end
@brianteeman thanks for testing, appreciated and Merry Xmas
I have not tested this item.
Sorry I had to remove my successful test.
The PR moves the css to the media folder BUT tinymce still refers to the /templates/ folder when it is looking for an editor.css otherwise it gives an error everytime you open an editor.
if ($use_content_css)
{
// First check templates folder for default template
// if no editor.css file in templates folder, check system template folder
if (!file_exists($templates_path . '/' . $template . '/css/editor.css'))
{
// If no editor.css file in system folder, show alert
if (!file_exists($templates_path . '/system/css/editor.css'))
{
Log::add(Text::_('PLG_TINY_ERR_EDITORCSSFILENOTPRESENT'), Log::WARNING, 'jerror');
}
else
{
$content_css = Uri::root(true) . '/templates/system/css/editor.css';
}
}
else
{
$content_css = Uri::root(true) . '/templates/' . $template . '/css/editor.css';
}
}
}
```<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/31781">issues.joomla.org/tracker/joomla-cms/31781</a>.</sub>
Category | Administration Templates (admin) NPM Change Repository Front End Templates (site) JavaScript | ⇒ | Administration Templates (admin) NPM Change Repository Front End Plugins Templates (site) JavaScript |
@brianteeman good catch! 6541859 should fix that
The last patch solved the error message but I'm not sure if the editor.css is being used. And shouldnt it be the minified file?
And shouldnt it be the minified file?
Joomla just hands in the url for the css to tinyMCE which is doing all the work here (it's in an iframe so it needs a bit more digging to get to it). Could it be minified? Sure but since we're doing all the checks ourselves (in the tinyMCE plugin, the PHP part) we have to do that ourselves. The part that I reverted was using HTMLHelper::stylesheet
which does all the work in the background for us but it was wrong as it needs to refer to the active front end template (by default it refers to the current active template which will be wrong for the backend part)
I will redo this PR with a twist, we can do better here
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-12 15:09:53 |
Closed_By | ⇒ | dgrammatiko |
You are deleting
administrator/templates/system/images/calendar.png
but it is still referenced here i thinkjoomla-cms/build/media_source/system/scss/general.scss
Line 163 in 9a467db