Just manager and web, never worked with contexts.
Itâs weird that the âaliasMapâ array is empty. It must have worked on the old server. I have no idea why it wouldnât work now.
When you run this SQL query (for example with phpMyAdmin), do you get a result?
SELECT `r`.`id`, `r`.`parent`, `r`.`uri` FROM `modx_site_content` `r` FORCE INDEX (`cache_refresh_idx`) LEFT JOIN `modx_context_resource` `cr` ON `cr`.`context_key` = 'web' AND `r`.`id` = `cr`.`resource` WHERE `r`.`deleted` = 0 AND (`r`.`context_key` = 'web' OR `cr`.`context_key` IS NOT NULL) GROUP BY `r`.`parent`, `r`.`menuindex`, `r`.`id`, `r`.`uri`
These getResources log messages arenât errors. They just appear in the log because you use the &debug=`1`
property.
In phpmyadmin I get the error:
#1176 - Key 'cache_refresh_idx' doesn't exist in table 'r'
Maybe when you moved the database to the new server, the indexes havenât been moved as well.
In phpMyAdmin â table modx_site_content
â tab âStructureâ, when you scroll down to the section âIndexesâ, are there any indexes listed?
Scrolling down I see:
Data 16 Kib
Index 0 B
Total 16 KiB
How did you transfer the database data? With a .sql
file you exported with phpMyAdmin?
In the .sql
file, the CREATE TABLE
command for modx_site_content
(and all the other tables) should include the indexes (for example KEY `cache_refresh_idx` (`parent`,`menuindex`,`id`)
):
DROP TABLE IF EXISTS `modx_site_content`;
CREATE TABLE IF NOT EXISTS `modx_site_content` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` varchar(20) NOT NULL DEFAULT 'document',
...
PRIMARY KEY (`id`),
KEY `alias` (`alias`),
...
KEY `cache_refresh_idx` (`parent`,`menuindex`,`id`)
)
The sql file from a backup. I see in the old table:
Index 304 KiB; should I export/import this to the new table?
So I guess the indexes are all missing?!
Does the SQL command SHOW INDEXES FROM `modx_site_content`;
return anything?
If there are no indexes, you probably have to import the data again or transfer it differently, so that MySQL knows what indexes to create.
No table site_content_indexes.
Returns empty; on the old server it is not empty, I will transfer these to the new database. I will try it tomorrow.
Halftrainedharry, thankyou so far.
Goodmorning halftrainedharry, Iâve made the new export/import of the table modx_site_content, and everything is working smoothly. With cache_alias_map now set to âyesâ I see a large array under âaliasMapâ on the file âcontext.cache.phpâ.
Youâve made my day, thanks!