if we add a new domain to system root urls (under system configuration), will this re populate the database with the correct lookups for the remaps etc, or is there a script we can run from the scripts folder to achieve this?
thanks.
No, it wont add URLs to your system. It just makes them available to Site assets.
You can use the scripts/add_remove_url.php script to apply the URL to a site. It doesn't change remaps, but it does change site and page URLs.
Thanks Greg,
We tried this:
/usr/bin/php-cli add_remove_url.php /www/mysource_matrix/ -action=add -http, 87, www-current-url, new-url
It then asks for the root password and once provided it does not show or seem to do anything. But we get this error:
PHP Fatal error: Call to undefined function: setcurrentuser() in /www/mysource_matrix/scripts/add_remove_url.php on line 48
Any suggestions?
Thanks
[quote]No, it wont add URLs to your system. It just makes them available to Site assets.
You can use the scripts/add_remove_url.php script to apply the URL to a site. It doesn't change remaps, but it does change site and page URLs.[/quote]
I think you are suffering from a bug in the script for versions less than 3.16.6.
To fix, you can edit the file (around line 45) and
Change this: $GLOBALS['SQ_SYSTEM']->am->setCurrentUser($root_user);
To this: $GLOBALS['SQ_SYSTEM']->setCurrentUser($root_user);
[quote]I think you are suffering from a bug in the script for versions less than 3.16.6.
To fix, you can edit the file (around line 45) and
Change this: $GLOBALS['SQ_SYSTEM']->am->setCurrentUser($root_user);
To this: $GLOBALS['SQ_SYSTEM']->setCurrentUser($root_user);[/quote]
I changed this line but I am getting another error:
[ASSERT EXCEPTION] DB Error: unknown errorSELECT url FROM sq_ast_url WHERE url LIKE 'new-url'; [nativecode=ORA-00911: invalid character] (LINE 135 IN [SYSTEM_ROOT]/scripts/add_remove_url.php) [SYS0270] |
I tried looking up the oracle error code and found that it could be a special character not being escaped in between quotes '' but the query seems to add this automatically in 'new-url'
Any sugestions? Thanks
[quote]I changed this line but I am getting another error:
[ASSERT EXCEPTION] DB Error: unknown errorSELECT url FROM sq_ast_url WHERE url LIKE 'new-url'; [nativecode=ORA-00911: invalid character] (LINE 135 IN [SYSTEM_ROOT]/scripts/add_remove_url.php) [SYS0270] |
I tried looking up the oracle error code and found that it could be a special character not being escaped in between quotes '' but the query seems to add this automatically in 'new-url'
Any sugestions? Thanks[/quote]
Download the latest 3.16 release and take a copy from there. There were some others fixes in the script that are too hard to patch.
I downloaded 3.16.9, replaced the old script with the new one but does not work, the same error shows.
Best to just submit a bug then: http://bugs.matrix.squiz.ne
If we upgrade the whole system to 3.16.9, will this fix the problem? The change log mentions the following:
Fixed bug #3017: Bugs in mysource_root/scripts/add_remove_url.php script
Or is this a separate bug?
I only replaced this file (add_remove_url.php) on our system 3.16.8.
Thanks
That was the only file changed for that bug, so copying it from the 3.16.9 install will give you that particular fix. Your issue must be different.
Is there any other way to add new urls to the system so that the URL is propergated through the sq_ast_url, sq_ast_lookup, sq_ast_lookup_remap, sq_ast_lookup_value and any other table, that uses a url.
We have tried the script and it errors.
A bug has been submitted.
Thanks
The only way to do that is to use the admin interface or the script.
If you are an SLA client, I would also log a Support Request under your SLA.