Latest build: Display Suite 7.x-2.x-dev (2012-May-31). Error displays on Manage Display pages, and node pages (?).
Notice: Undefined offset: 1 in _ds_field_ui_fields() (line 1824 of /home/me/public_html/thct.mysite.com/sites/all/modules/ds/includes/ds.field_ui.inc).
Seems that your default value "#" is triggering this now. (Don't recall that being the case before.) But, it cannot be deleted -- after deleting the "#" sign and saving the build, the symbol returns. Kinda an endless validation loop.
In my case, the field is a slideshow field (Field Slideshow 7.x-1.6). My builds, Teaser with and Full Contnet without using offset, were working fine before updating to this latest build.
Comment | File | Size | Author |
---|---|---|---|
#20 | notice_undefined-1623590-17-interdiff.patch | 2.92 KB | bceyssens |
#17 | notice_undefined-1623590-17.patch | 4.49 KB | bceyssens |
#15 | notice_undefined-1623590-15.patch | 4.51 KB | bceyssens |
#13 | notice_undefined-1623590-13.patch | 1.52 KB | claudiu.cristea |
#7 | 1623590-7.patch | 829 bytes | swentel |
Comments
Comment #1
swentel CreditAttribution: swentel commentedIf I look at that line (in my local installation), this has something todo with a custom fields. Do you have a custom field in your installation, if so, look at the 'UI limit' textarea on the custom field form, because it has invalid data in that case. The '#' that returns is no problem at all.
Comment #2
swentel CreditAttribution: swentel commentedComment #3
yeken CreditAttribution: yeken commented> created a code field for user (set limit field to *)
> under user display got the
Notice: Undefined offset: 1 in _ds_field_ui_fields()
error codeIt had to do with the "limit field" textarea while defining the code field, i then left it blank and the problem was solved.
Comment #4
drvdt CreditAttribution: drvdt commentedIt caused by you chose the wrong filter. Change "Display Suit code" to "HTML" or something else.
Comment #5
aimevpI got this same error after selecting a DS layout on the "Manage Display" page of a taxonomy vocabulary.
When changing it back to 'no layout' selected the error disappears.
I also have a few custom fields on that vocabulary but none of them have a limit.
This was the exact error message:
Notice: Undefined offset: 1 in _ds_field_ui_fields() (line 1857 of /path/to/site/www/sites/all/modules/contrib/ds/includes/ds.field_ui.inc).
I'm working on a Drupal 7.22 with Display Suite 7.x-2.4.
If you need any other information, just let me know.
Comment #6
aimevpComment #7
swentel CreditAttribution: swentel commentedThat's because '*' alone doesn't work. It needs to be *|* then. I've updated the documentation a bit though in the interface.
Moving to 8.x-2.x as well.
Comment #8
swentel CreditAttribution: swentel commentedCommitted and pushed to 8.x-2.x
Comment #9
adaddinsaneI'm afraid that guidance does not necessarily help because it's very easy to add a blank line after putting something in the field and once again the error occurs. Filtering out blanks lines might be useful.
Obviously it's not a critical problem but it is irritating.
Comment #10
kappaluppa CreditAttribution: kappaluppa commentedI am getting this problem on Display Suite 7.x-2.6
If I create a custom display
and
use a any layout other than 'none'
the item number option field is displayed with '#' entered in the box. I cannot delete the '#' - when I do and save, it comes right back.
The error appears whether the field (all taxonomy) is active, hidden or disabled.
Comment #11
aspilicious CreditAttribution: aspilicious commentedThe '#" is the default, meaning load everything
Comment #12
claudiu.cristeaThis is caused also by empty lines at the end (or within) the limitation text area.
Comment #13
claudiu.cristeaHere's a patch for 7.x-2.x-dev. I fixed also the line endings conversion which was incomplete. There are 2 conversions to be made:
\r\n
(Win) =>\n
(Unix)\r
(Mac, old style) =>\n
(Unix)Only the first has been covered.
Comment #14
aspilicious CreditAttribution: aspilicious commentedComment #15
bceyssensI added an element validation function to check the ui_limit field entry to prevent the "Undefined offset" error from occurring. I also moved pieces of patch #13 to this function so it will be stored in the database correctly. This should fix both issues.
Comment #16
claudiu.cristeaThere's no reason to extract the huge entity info array here only to pass it to
_ds_check_existing_ui_limit()
. Instead get the info inside the function:You can also rename
$entity
to$entity_type
to be consistent with Entity API coding.Must end with dot.
Should end with dot.
Use
===
operator here to detect a strictFALSE
, not 0 (if the pipe is the first char).Missing end dot.
Missing end dot.
I don't understand why we do the check in
_ds_check_existing_ui_limit()
. That seems to me a little bit over engineered.Comment #17
bceyssensI checked with aspilicious, he thought it would be better to check if the bundle/view mode combination was valid. If this is not the case we should let the user know. Here's the new patch.
Comment #18
claudiu.cristeaCan you provide an interdiff please?
Comment #19
claudiu.cristeaAnyway, looks good to me. Thanks.
Comment #20
bceyssensThe interdiff of #17
Comment #22
bceyssensThank for the input guys!