Closed (fixed)
Project:
XML sitemap
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2009 at 22:11 UTC
Updated:
20 Apr 2009 at 06:50 UTC
I just did a bulk update of aliases (pathauto) and got the following errors
* warning: Illegal offset type in isset or empty in /var/www/bin/drupal-6.10/sites/all/modules/xmlsitemap/xmlsitemap_helper/xmlsitemap_helper.module on line 112.
* warning: Illegal offset type in /var/www/bin/drupal-6.10/sites/all/modules/xmlsitemap/xmlsitemap_helper/xmlsitemap_helper.module on line 113.
This is the apparent 2009-Mar-11 version I have commented on elsewhere.
Comments
Comment #1
tamhas commentedChecking the resulting xmlsitemap, it appears that not all of the nodes got new aliases. Don't know if this is because of the error or some flaw in pathauto.
Comment #2
avpadernoXML Sitemap uses the path aliases set by any third-party modules, or by Drupal core modules.
Can you tell me the weight of pathauto.module in your Drupal installation? It can be it has a heavier weight than xmlsitemap.module, or it can be simply the problem Drupal has with path aliases being set when more than a language is enabled.
Comment #3
mista_k commentedI'm confirm this issue. It can be easily reproduce. Try to delete/update alias for terms and you've got an error.
I'm discover that $module in your function xmlsitemap_helper_update_sitemap() is array and not just a string as you expect.
I have quickly eliminated this error by additional check. But I'm not sure that has made all correctly.
if (!is_array($module) && !isset($modules[$module])) {
$modules[$module] = TRUE;
variable_set('xmlsitemap_update_sitemap_request', $modules);
}
Comment #4
avpadernoThe $module parameter of
xmlsitemap_helper_update_sitemap()is supposed to be a string, not an array. If some function passes an array toxmlsitemap_helper_update_sitemap(), then that code is wrong.Actually, I don't see any function that passes an array to
xmlsitemap_helper_update_sitemap(), and I don't see any relation between that function, and pathauto.module.Comment #5
avpadernoI changed the submit function used for the path aliases administration pages, in the case the problem was caused by some incompatibilities between the arguments passed to the submit function, and the arguments it expected.
Comment #6
tamhas commentedSorry for my inexperience, but where do I look at the weight of a module?
Comment #7
avpadernoThe weight of a module is reported in the system database table.
Comment #8
mista_k commentedThere is weight values from my DB:
name = weight
pathauto = 1
xmlsitemap = 2
xmlsitemap_engines = 0 (disabled)
xmlsitemap_file = 0 (disabled)
xmlsitemap_menu = 10
xmlsitemap_node = 5
xmlsitemap_term = 10
xmlsitemap_user = 0 (disabled)
xmlsitemap_helper = 0
What's wrong with them?
Comment #9
avpadernoI asked about the modules weight because, if xmlsitemap.module would have a lighter weight than pathauto.module, the path aliases used by xmlsitemap.module would not be the ones set by pathauto.module (or they would not be the latest ones set by pathauto.module).
The cause of the issue was a different one, and the issue should have been resolved.
Comment #10
tamhas commentedI seem to have the same weights as mista_k ... so, you are saying that these are OK?
Comment #11
avpadernoYes, they are; xmlsitemap.module must be executed after the other module.
Anyway, the weight of a module should solely set by the installation code of a module.
Comment #12
avpadernoIs the issue still present in the last commits?
Comment #13
tamhas commentedHow would we know, if we have already succeeded in generating the backlog of existing nodes?
I'm curious too about how to audit for completeness.
Comment #14
mista_k commentedI can't reproduce this issue with latest xmlsitemap and latest pathauto. Thanks for good work.
Comment #15
avpadernoBasing on the last comment left, I am setting the issue as fixed.