I get the above error when I enable Taxonomy Autotagger with user input and then try to go to new content form.

Comments

sjtout’s picture

Some type mismatch issue seems to be at work here--I'm not sure how to address it.

Line 243 is:

$form[$key]['#default_value'] = $value;

I tried changing that to:

$form->$key['#default_value'] = $value;

That got past the fatal error page, and the content entry form page did render, but it has a very long list of errors at the top that begins like this:

# warning: Invalid argument supplied for foreach() in [path]\sites\all\modules\autotag\autotag.module on line 338.
# warning: array_keys() [function.array-keys]: The first argument should be an array in [path]\sites\all\modules\autotag\autotag.module on line 344.
# warning: Invalid argument supplied for foreach() in [path]\sites\all\modules\autotag\autotag.module on line 346.
# warning: Cannot use a scalar value as an array in [path]\sites\all\modules\autotag\autotag.module on line 244.
# warning: Cannot use a scalar value as an array in [path]\sites\all\modules\autotag\autotag.module on line 244.

Those three errors -- from lines 338, 344 and 244 are repeated multiple times (mostly 244).

Can anyone help with this? I'd love to have autotagger's functionality.

Thanks

sdrycroft’s picture

I've not seen this one before. What content type are you trying to edit?

sjtout’s picture

It's a custom content type that is basically a story with a filefield upload field, and a node reference field from the 'Node Reference' module. Does the content type matter? I was thinking maybe it had to do with my version of PHP (5.2.9-2)... getting stricter on typing and declaring or something similar ... ?

Here's a discussion on a similar issue in a different context: http://www.dynamicdrive.com/forums/showthread.php?t=19961 --if that's at all helpful. Thank you for looking at this -- I think your autotagging module would be a real benefit on my site -- & thank you for your work on it.

sjtout’s picture

Some clarification -- I just tried to disable Node Reference, thinking if there were an issue, it might be a conflict with that. I enabled Autotagger and got the same original fatal error, changed the line of code again, and when I went to the Modules page saw the long list of errors, as described above (this was going to the modules page tho, not the create content page--this makes me think I was actually going to the modules page in the earlier entry--now I'm unsure).

I tried to go to 'create content->resource' and got this error:

Fatal error: Only variables can be passed by reference in [path]\includes\form.inc on line 1340

Disabled Autotagger (and lowername), and the errors all went away.

sdrycroft’s picture

Can you try changing line 239 from...

    if(isset($form[$key])){

to...

    if(isset($form[$key]) && is_array($form[$key])){

The rest of the PHP Warnings you're getting can most likely be ignored for now.

sjtout’s picture

I'm caught in a release cycle at the moment, and my test environment is in messy state (there's some kind of conflict of corruption I think)--it may be a couple of days before I can test.

sjtout’s picture

I reinstalled 6.x-1.25, then changed the line above. All of the error messages have gone away, and I'm seeing this behavior:

1) When I first select 'Create Resource' [the name of my content type], my wysiwyg editor (FCKEditor) isn't available as an editor for the body of the node.
2) Some terms I type into the body aren't picked up, some are.
3) After clicking 'Next' I got my first chance to see the Autotag UI in action. I see a 'Save' button on the 'Terms' form, under the drag and drop UI, this is in addition to the save at the bottom of the page. Neither of these buttons work -- when I press either, page refreshes but nothing else seems to change.

I'm not sure what's going on -- there may be some corruption in my test environment. I'll have to respawn my test environment to check, and won't be able to do that for a couple of weeks.

FWIW, the functionality I want is:
1) Autotag, with the option to mark some of the tags 'found' as 'don't use' [that's an important consideration and I've only seen it attempted in your module]
2) Automatic parent tag insertion
3) Automatic synonym replacement

For now, I'm going with a combination of MO_AutoAddTerms, which provides automatic tagging, and Unitag, which provides parent tag insertion, synonym replacement and a 'tag suggestion queue' that makes a 'free tag' vocabulary a little more manageable. However, MO_AutoAddTerms doesn't allow you to mark tags it's found as 'don't use', and at the moment, doesn't integrate with Unitag (it adds tags based on content found in the text, but Unitag won't pick up those adds and insert parents appropriately).

Thanks

sdrycroft’s picture

Version: 6.x-1.24 » 6.x-2.0
Status: Active » Fixed

This should be fixed in 6.x-2.0.

Status: Fixed » Closed (fixed)

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