Illegal offset type in \content_taxonomy_hs.module on line 293.

realityloop - September 29, 2008 - 01:00
Project:Content Taxonomy
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

When using Hierarchical Select if you enable the following settings:
*Save term lineage
*Allow the user to choose a term from any level
*Enable level labels

Save and then use the link to go "Back to the field configuration"

Save options: *both
Depth of taxonomy tree: 2

If you click save on the field options now you will get the error from the subject.

You can stop this error by editing the widget settings via the "configure this Hierarchical Select widget's settings." link, and unchecking *Enable level labels , clicking the save button on this page, and then enabling it again.

This will work as long as you don't go back to the field configuration and click "save field settings"

If you click "save field settings" the error will return.

#1

realityloop - September 29, 2008 - 01:51

When both is selected, it only appears to be saving in CCK field correctly, the Term information is incorrectly saved.

Also if I only select:
Save options:
*Save as tag

The error returns, therefor it seems that currently only the option to "*Save in cck table" is working properly.

Edit: Looks like saving the field at any time after saving "Hierarchical Select configuration" will cause this module to error.. You need to save the "Hierarchical Select configuration" after you have set the field settings.

#2

jdotti - October 21, 2008 - 07:34

Thanks, I have the same message.

But is it normal ?

JD

#3

realityloop - October 21, 2008 - 21:25

jdotti: I don't think it should act this way which is why I have reported the issue.

#4

Wim Leers - March 7, 2009 - 16:18
Status:active» closed

I cannot reproduce this. Closing this issue since I'm cleaning up the issue queue. If you can still reproduce this on a fresh install, feel free to mark it as active again.

#5

gkanski - May 15, 2009 - 12:11
Status:closed» active

Hi, I have installed the latest 5.x-3.x-dev version (22/03/2009) and still have this "illegal offset" bug I had before. I've tried many combinations of parameters with no luck - I cannot get rid of this problem. In my opinion this bug was not fixed.

#6

Morgenstern - May 19, 2009 - 16:04

I experienced the same problem and after reading a bit about the Illegal offset type issue of PHP I came across the solution of doing the following:

Change Line 293 from

<?php
          $keys
[$node_field['tids']] = $node_field['tids'];
?>

to

<?php
          $keys
[(String) $node_field['tids']] = $node_field['tids'];
?>

I've never written a patch before but just gave it a try for this thing ...

AttachmentSize
content_taxonomy_hs.patch 480 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.