I get the following right after installing rdfx.module, wondering if there is a conflict between the xsd:token stuff in rdfx module and Token module:
Warning: uasort(): The argument should be an array in token_get_info() (line 226 of /var/www/html/sites/all/modules/token/token.module).
Notice: Undefined index: tokens in token_get_info() (line 227 of /var/www/html/sites/all/modules/token/token.module).
Warning: array_keys(): The first argument should be an array in token_get_info() (line 227 of /var/www/html/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in token_get_info() (line 227 of /var/www/html/sites/all/modules/token/token.module).
Warning: array_keys(): The first argument should be an array in token_get_info() (line 233 of /var/www/html/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in token_get_info() (line 233 of /var/www/html/sites/all/modules/token/token.module).
Warning: array_keys(): The first argument should be an array in theme_token_tree() (line 40 of /var/www/html/sites/all/modules/token/token.pages.inc).
Warning: Invalid argument supplied for foreach() in theme_token_tree() (line 53 of /var/www/html/sites/all/modules/token/token.pages.inc).
Comment | File | Size | Author |
---|---|---|---|
#6 | 976340-rdfx-define-causes-mayhem-D7.patch | 1011 bytes | Dave Reid |
#5 | 976340-rdfx-define-causes-mayhem-D7.patch | 1015 bytes | Dave Reid |
Comments
Comment #1
deltab CreditAttribution: deltab commentedAnd in Watchdog, I see this:
Warning: array_keys(): The first argument should be an array in theme_token_tree() (line 40 of /var/www/html/sites/all/modules/token/token.pages.inc).
Warning: Invalid argument supplied for foreach() in theme_token_tree() (line 53 of /var/www/html/sites/all/modules/token/token.pages.inc).
----------------------------------
the warnings disappear as soon as I disable rdfx, however, while the module is installed, no tokens are visible on ./admin/help/token page, just the warnings.
Comment #2
scor CreditAttribution: scor commentedCould you post the versions of the modules you're using (token, rdfx, plus others?)
Comment #3
deltab CreditAttribution: deltab commentedhi, with Drupal Core: 7.0-beta3 just these three modules:
Pathauto: 7.x-1.0-alpha2
Token: 7.x-1.0-alpha3
RDFx: 7.x-2.x-dev
I am on RHEL 5, PHP 5.2x. Initially, when the error occurred, I also had Automatic Nodetitles 7.x-1.0-alpha1 and some CCK modules such as Name Field 7.x-1.0-alpha1, Email 7.x-1.0-alpha2 etc., however, for the latest, I am using just Patauto, Token and all RDFx modules (Evoc, RdfUI, Rdfx). The error occurs when I enable rdfx.module.
Comment #4
Dave ReidI think I've narrowed this down. Because the url() function is used to define a constant, something is going horribly horribly wrong because that causes Drupal to invoke hooks before all modules are loaded, and then it causes Drupal to miss hook definitions of modules not yet included, like Pathauto.
In short, don't use url() until all modules are loaded!
Comment #5
Dave ReidSimple solution, remove the define() since it's unnecessary and not even used in any of the module code (I grepped for it and there were 0 results).
Comment #6
Dave ReidComment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks so much for ferreting this out, Dave Reid. This was part of functionality that scor had in RDF CCK that created a site vocab to describe all fields. I'm not sure whether he's planning on implementing it in D7, but this seems like a pretty big issue so let's clear it up now and add in something that doesn't cause mayhem later if we need it.
Dave Reid, is the second hunk in the patch necessary for this fix? Or is that related to another issue?
Comment #8
Dave ReidIt was something I saw while going through the code in the area that seems like it would be a best practice.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks, everyone :) This has been fixed with the commit in https://github.com/scor/rdf/commit/2e747b347f5db7b334a1604e12dfb981266ed9b3
I'll be adding the second hunk as another issue since scor has been dealing more with this part of the module than I have, so give him a chance to look it over.
Comment #10
Blooniverse CreditAttribution: Blooniverse commentedGreat! Thanks. When are you going to publish the new module version on http://drupal.org/project/rdf?
Comment #11
scor CreditAttribution: scor commentedChanges committed to CVS. The 7.x-2.x-dev tarball should be updated automatically in a few hours.
Comment #13
milesw CreditAttribution: milesw commented