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

tamhas’s picture

Checking 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.

avpaderno’s picture

Status: Active » Postponed (maintainer needs more info)

XML 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.

mista_k’s picture

I'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);
}

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Active

The $module parameter of xmlsitemap_helper_update_sitemap() is supposed to be a string, not an array. If some function passes an array to xmlsitemap_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.

avpaderno’s picture

I 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.

tamhas’s picture

Sorry for my inexperience, but where do I look at the weight of a module?

avpaderno’s picture

The weight of a module is reported in the system database table.

mista_k’s picture

There 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?

avpaderno’s picture

I 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.

tamhas’s picture

I seem to have the same weights as mista_k ... so, you are saying that these are OK?

avpaderno’s picture

Yes, 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.

avpaderno’s picture

Status: Active » Postponed (maintainer needs more info)

Is the issue still present in the last commits?

tamhas’s picture

How 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.

mista_k’s picture

I can't reproduce this issue with latest xmlsitemap and latest pathauto. Thanks for good work.

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Fixed

Basing on the last comment left, I am setting the issue as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.