I moved a site to a new host. the site uses FURLs. however FURL is not working and the links generated by modx lead to error page. If I disable FURL I an see the resource in full.
my modx error log is full of these entries:
[2023-08-14 08:00:07] (ERROR @ /var/www/mysite/core/src/Revolution/modX.php : 1072) `` is not a valid integer and may not be passed to makeUrl()
this is on revo 3.0.3-pl
my header has
<base href="[[!++site_url]]" />
any ideas how to resolve?
server is Server version: Apache/2.4.38 (Debian) and using php 7.4
If you have (for example) an URL like this: https://www.yourdomain.com/test.html.
Does it work if you call it like this instead? https://www.yourdomain.com/index.php?q=test.html
With the alias added as the request parameter “q” (Presuming that the value of the system setting “request_param_alias” is q).
If that works, then the problem is the .htaccess file.
the CSS is a modx resource set as CSS not a system file (database only) and it worked flawlessly on previous host. apache indeed serves fine other system files CSS I have.
I can confirm I am able to request files under assets/
I also confirmed all the paths are correct under these files:
Are the values in the database table modx_site_content → column uri correct?
In the cache file /core/cache/context_settings/web/context.cache.php, do the resources under the key 'aliasMap' have the correct values?
Basically FURLs in MODX work like this:
A request like https://www.yourdomain.com/test.html gets rewritten in the .htaccess file to https://www.yourdomain.com/index.php?q=test.html
In MODX, the request parameter “q” is used to search for a matching “alias” in the 'aliasMap' (or the column uri in the database table).
The error page is shown if no matching resource can be found.
You could (temporarily) add a custom plugin to try to debug what’s happening.
Some code like this may help to clear up the situation.
It logs some information and the values of important settings to the MODX error log.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.