[Bug]: URLGenerator getAbsoluteURL is not working properly #47880
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
29-feedback
bug
feature: settings
Bug description
My nextcloud instance is running without issues; I use Nextcloud in a subdir of the NGINX webroot setup with a slight variation:
I add the nginx
root
declaration (e.g.root /var/www
) insidelocation ^~ /nextcloud
declaration because I want to have anotherroot
for my nginx global configuration.When I run
occ setupchecks -vv
and use echo to check theURLGenerator->getAbsoluteURL(...)
internal workings I notice thatif (\OC::$CLI && !\defined('PHPUNIT_RUN'))
doesn't take into account the possibility for$url
parameter to already contain the Nextcloud subdir (e.g. /nextcloud). This breaks the url for "JavaScript source map support" and "JavaScript modules support" tests. Nextcloud instance on nginx works fine though; that's, I guess, becauseif (\OC::$WEBROOT !== '' && str_starts_with($url, \OC::$WEBROOT))
is used for web which takes into account the Nextcloud subdir.Steps to reproduce
occ setupchecks -vv
Expected behavior
"JavaScript source map support" and "JavaScript modules support" tests should pass
Nextcloud Server version
29
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 28 to 29)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
no logs are creating when running
occ setupchecks -vv
Additional info
Nextcloud Signing status was generated by this URL: https://adrhc.go.ro/nextcloud/index.php/settings/integrity/failed
The text was updated successfully, but these errors were encountered: