No Code Attached Yet
avatar brianteeman
brianteeman
16 Mar 2022

Steps to reproduce the issue

On a completely clean checkout of the 4.1dev branch do the usual composer install and npm ci
Then try to install joomla

Expected result

image

Actual result

image

Additional comments

If I change

->registerAndUseStyle('template.installation', 'template' . ($this->direction === 'rtl' ? '-rtl' : '') . '.css')

to
->registerAndUseStyle('template.installation', 'installation/template/css/template' . ($this->direction === 'rtl' ? '-rtl' : '') . '.css')

Then I get the expected result.

Has something changed or am I going mad?

avatar brianteeman brianteeman - open - 16 Mar 2022
avatar joomla-cms-bot joomla-cms-bot - change - 16 Mar 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Mar 2022
avatar chmst
chmst - comment - 16 Mar 2022

On a completely clean checkout of the 4.1dev branch do the usual composer install and npm ci
Then try to install joomla

No problem here. Working on win11, xampp, php 8.0.

avatar brianteeman
brianteeman - comment - 16 Mar 2022

weird

avatar chmst
chmst - comment - 16 Mar 2022

I have no idea. The latest commit in my branch ist this #37279, maybe it solved the problem for me?

avatar richard67
richard67 - comment - 16 Mar 2022

I have no idea. The latest commit in my branch ist this #37279, maybe it solved the problem for me?

That should not be the case. That commit was only for the debug bar.

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

@brianteeman what's your local server's setup? eg localhost but the current installation is a folder (or folders) deeper?

avatar brianteeman
brianteeman - comment - 16 Mar 2022

localhost/joomla-cms

avatar brianteeman
brianteeman - comment - 16 Mar 2022

it's weird because the nightly build installs fine. so it must be something in the npm build scripts. gave up trying to work it out for now.

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

@brianteeman this is a bug your proposal is correct. My bad

Check #37292

avatar richard67 richard67 - change - 16 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-16 12:20:43
Closed_By richard67
avatar richard67 richard67 - close - 16 Mar 2022
avatar richard67
richard67 - comment - 16 Mar 2022

Closing as having a pull request. Please test #37292 . Thanks in advance.

avatar chmst
chmst - comment - 16 Mar 2022

How then is it working for me on a fresh branch? Strange.


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

avatar richard67
richard67 - comment - 16 Mar 2022

Yes, I am wondering about the same #37292 (comment)

avatar brianteeman
brianteeman - comment - 16 Mar 2022

are you in a subdirectory?

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

@chmst @brianteeman @richard67 my guess is that somehow the $relative argument is passed wrongly here:


from here:
protected function isPathAbsolute(string $path): bool

OR the installation template options (either inheritable or parent) are wrongly set

avatar richard67
richard67 - comment - 16 Mar 2022

No, I'm not in a subdirectory. I have an Apache Vhosts environment where Joomla is in the root of the particular VHost.

avatar richard67
richard67 - comment - 16 Mar 2022

@dgrammatiko Hmm, the method is named "isPathAbsolute", but it returns true if the given path exists below the Joomla root, i.e. is relative, and the doc block says "Check if the Path is relative to /media folder or absolute", which sounds as if it should do that, but then the name of that method would be wrong.

I would know whom to ask now, but I fear that one is currently not available due to reasons (sad).

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

@brianteeman could you please add

		var_dump([is_file(JPATH_ROOT . '/' . $path) => $path]);

before

return is_file(JPATH_ROOT . '/' . $path);
and share the results for the installation page?

@richard67 sadly yes

avatar chmst
chmst - comment - 16 Mar 2022

I am in xampp/htdocs/joomla-4 - a new empty directory, pulled the latests 4.1-dev, so everything as usual.

avatar brianteeman
brianteeman - comment - 16 Mar 2022

The results on a working install in the subdirectory are


array(1) {
  [1]=>
  string(38) "installation/template/css/template.css"
}
array(1) {
  [0]=>
  string(50) "vendor/joomla-custom-elements/joomla-alert.min.css"
}
array(1) {
  [0]=>
  string(18) "system/core.min.js"
}
array(1) {
  [0]=>
  string(46) "vendor/webcomponentsjs/webcomponents-bundle.js"
}
array(1) {
  [0]=>
  string(27) "system/keepalive-es5.min.js"
}
array(1) {
  [0]=>
  string(29) "system/fields/validate.min.js"
}
array(1) {
  [0]=>
  string(26) "system/messages-es5.min.js"
}
array(1) {
  [0]=>
  string(36) "system/joomla-core-loader-es5.min.js"
}
array(1) {
  [0]=>
  string(23) "system/keepalive.min.js"
}
array(1) {
  [1]=>
  string(36) "installation/template/js/template.js"
}
array(1) {
  [0]=>
  string(22) "system/messages.min.js"
}
array(1) {
  [0]=>
  string(32) "system/joomla-core-loader.min.js"
}

avatar brianteeman
brianteeman - comment - 16 Mar 2022

and the results with the current (non-working) code is


array(1) {
  [1]=>
  string(12) "template.css"
}
array(1) {
  [0]=>
  string(50) "vendor/joomla-custom-elements/joomla-alert.min.css"
}
array(1) {
  [0]=>
  string(18) "system/core.min.js"
}
array(1) {
  [0]=>
  string(46) "vendor/webcomponentsjs/webcomponents-bundle.js"
}
array(1) {
  [0]=>
  string(27) "system/keepalive-es5.min.js"
}
array(1) {
  [0]=>
  string(29) "system/fields/validate.min.js"
}
array(1) {
  [0]=>
  string(26) "system/messages-es5.min.js"
}
array(1) {
  [0]=>
  string(36) "system/joomla-core-loader-es5.min.js"
}
array(1) {
  [0]=>
  string(23) "system/keepalive.min.js"
}
array(1) {
  [1]=>
  string(36) "installation/template/js/template.js"
}
array(1) {
  [0]=>
  string(22) "system/messages.min.js"
}
array(1) {
  [0]=>
  string(32) "system/joomla-core-loader.min.js"
}

avatar richard67
richard67 - comment - 16 Mar 2022

Hmm, the function seems to return true if the path exists as relative path directly below the Joomla root, and false if that is a relative path not directly below the joomla root but somewhere deeper. so the name of the method might be misleading indeed, but it seems to do what it shall do for its usage.

Update: That was for the first test by Brian. In the 2nd test the first output seems to be wrong.

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

Ok, this doesn't make any sense,

array(1) {
  [1]=>
  string(12) "template.css"
}

the result should be

array(1) {
  [0]=>
  string(12) "template.css"
}

but it seems to do what it shall do for its usage.

Not really in the second case it's wrong

avatar richard67
richard67 - comment - 16 Mar 2022

Yes, I had only commented the first case.

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

@brianteeman do you have a file template.css under the root folder?

avatar brianteeman
brianteeman - comment - 16 Mar 2022

Let me check. Iv been doing some template work, maybe a file got left in the wrong place

avatar brianteeman
brianteeman - comment - 16 Mar 2022

That was it. my bad

I still think the pr is good though

avatar richard67
richard67 - comment - 16 Mar 2022

I still think the pr is good though

I agree.

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

That was it. my bad

Not really your fault. The heuristics used for deciding how to treat a path is undocumented and this is one of the edge cases that the logic will fail. Might worth couple of lines in the docs

avatar brianteeman
brianteeman - comment - 16 Mar 2022

as soon as you mentioned the subdirectory I just assumed it was another one of your mistakes ;)

avatar dgrammatiko
dgrammatiko - comment - 16 Mar 2022

Hehe, thankfully that wasn't the case this time but I'm leaving this for the next one

giphy

Add a Comment

Login with GitHub to post a comment