Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
After installing this module I got:
warning: Attempt to assign property of non-object in C:\wamp\www\drupal\modules\tokenize\tokenize.module on line 21.
Comment | File | Size | Author |
---|---|---|---|
#11 | 164464_tokenize_new_stdclass.patch | 634 bytes | greggles |
Comments
Comment #1
brahms CreditAttribution: brahms commentedI think you have to replace the code in line 21:
$node = stdClass;
with
$node = new stdClass();
Comment #2
Street-1 CreditAttribution: Street-1 commentedI got the same error. Making this change to the code fixed the problem for me too.
Comment #3
OliverColeman CreditAttribution: OliverColeman commentedTried the fix in #1 but to no avail.
It's an intermittent problem for me, not sure what triggers it, and it's occurring not just during installation.
Comment #4
functions CreditAttribution: functions commentedThis fix also resolved this issue for me.
Comment #5
Linulo CreditAttribution: Linulo commentedbrahms' fix worked for me, too.
Thank you.
Comment #6
scor CreditAttribution: scor commentedThat works for me too. Please commit this fix. A stable release should not contain such an error.
Comment #7
doc2@drupalfr.org CreditAttribution: doc2@drupalfr.org commentedReferencing issue: http://drupal.org/node/234600
Comment #8
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedAfter making the change above, the initial error goes away, but I get this error now.
warning: Invalid argument supplied for foreach() in
/html/sites/all/modules/tokenize/tokenize.module on line 94.
I chose to use tokens in a CCK link field that i created in a node profile
Link name:
View my profile
Default value
user/[author-uid]
I chose to "replace on node submission"
it saves.
I got to my profile and it gives me the above error on line 94
line 93 $fields = tokenize_get_settings(NULL, $node->type);
line 94 foreach($fields as $field => $method) {
What needs to be changed to make it work?
Thanks, Chris
Comment #9
laken CreditAttribution: laken commentedSame problem as activleyOUT. It looks like the tokenize_get_settings function is not returning a valid array when it's called, but I don't totally understand the code. Can anyone help here?
Thanks!
Comment #10
gregglessubscribing...I'd like to see this module working.
Comment #11
gregglesHere is a patch to fix the initial problem - now to fix the problems described by activelyOUT and alaken.
Comment #12
greggles@activelyOUT and @alaken - I'm not able to reproduce the problem as you have described it.
Also, please be sure to use the CVS HEAD code rather than the 5.x-1.0 release. There have been several changes since 5.x-1.0 to the HEAD which are not reflected in a release tarball. I know that's kind of a pain and I've asked to be a comaintainer of this module #272988: status of module (and offer to co-maintain), but until we have a resolution I don't want to create a 5.x-1.x-dev release.
Can you try the patch I've provided here and then see if you still have problems.
I did find that I had to add my field, tokenize enable it, save it, then "configure" the field again, make no changes, and save it to get it work. #273294: fields must be edited twice before tokenizer works
Comment #13
gregglesMorris responded on my issue agreeing to my proposal, so this is now fixed. If you wait 12 hours you'll be able to download the 5.x-1.x-dev.tar.gz file which I created which will contain this and several other changes. I hope that if you used Tokenize in that past and were turned off by this bug that you will give it another chance ;) (but not for 12 hours until the repackager runs). Thanks, folks.
Thanks, Brahms, for the suggestion that fixed it!
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.