I got that error 13 times on page /admin/reports/updates/check after uploading and unpacking the new version 1.6
Checking if the issue resolves easily =>
update.php(0 updates), cron.php & /admin/content/node-settings/rebuild
=> Errors remain.
line 660: foreach($to_states as $to_state) {
out of:
* Small helper for trigger and rules
*/
function _content_moderation_node_transition_matrix() {
static $node_state_matrix = array();
// chaching
if(count($node_state_matrix) > 0) {
return $node_state_matrix;
}
$states = _content_moderation_states();
$types = _content_moderation_moderate_node_types();
foreach($types as $type) {
foreach($states as $from_state) {
$to_states = _content_moderation_next_states($from_state,$type);
// Values are translated.
$to_states = array_keys($to_states);
foreach($to_states as $to_state) {
$node_state_matrix["{$type}_{$from_state}_{$to_state}"]= t("State of node type @type changed from '@from_state' to '@to_state'", array('@type' => $type, '@from_state' => $from_state, '@to_state' => $to_state));
}
}
}
foreach($to_states as $to_state) {
$node_state_matrix["anynode_anystate_{$to_state}"]= t("State of any node type changed to '@to_state'", array('@to_state' => $to_state));
}
return $node_state_matrix;
}
Comments
Comment #1
eugenmayer commentedwell i guess its a minor. It only happens if you yet have no states. Will consider it in the next release, thanks
Comment #2
ClearXS commented=> Ticked off the Content Moderation and Content Moderation Workflow UI & /admin/build/modules/uninstall & rebuild permissions
=> downloaded, uploaded and extracted the new version again to be sure
=> ticked them on again, safe config
=> NO, errors return
= = = = = = = =
You mention as it has no "states"...(?)
Looking for a install.txt file, but it is not there.
Then to admin/by-module => content moderation => admin/settings/moderation
"Set nodetypes shown which are moderated: article, blog, page" are selected. safe-config of-course doesn't make a difference.
What are "states"?
In the mean time I uninstall the module, as the error messages also get on the main page for other users.
Comment #3
ClearXS commenteddon't know why the issue changed back from minor to normal, so put it back as it was.
Then just ticking the two modules off, was sufficient this time to get rid of the error messages.
Comment #4
achtonFWIW, I have this experience also.
I'm not sure that it is caused by the lack of states, as it seems there are states predefined on a fresh install?
In any case, I installed the module on a completely blank D6 base, and have the error on all pages, same as the OP.
What other options can we try?
Comment #5
achtonPatch attached that initializes the variable in question. Works for me.
Comment #6
eugenmayer commentedWell this is now rather a bigger bug. Eventhough you have a quickfix, thats not the right one. Anyway thanks to you both for investigating!
I will fix this and release it ASAP
Comment #7
ClearXS commentederror disappears, can't check if functionality of the module is affected as I'm not using it yet
Comment #8
eugenmayer commentedfixed in the next released