On the admin page:
admin/structure/ds/fields

I can't delete any of the custom fields that I have created. When I select delete, I am directed to the following page with an error.

http://MYSITE/admin/structure/ds/fields/delete/title_as_link

Fatal error: Cannot use object of type stdClass as array in /var/www/dru7/sites/all/modules/filefield_paths/modules/file.inc on line 12

I can edit the fields without any trouble.

I am using Drupal 7.8
Display Suite 7.x-1.3

It does not seem to matter if I have created a preprocess field or code field. I can back out of the error without any ill effects. It just seems to happen when the delete is initiated.

I tried updating to the newest dev version, but it did not fix the delete issue.

I uninstalled DS and was able to recreate the problem by simply adding a custom field and then trying to delete it.

CommentFileSizeAuthor
#4 1309280-4.patch867 bytesswentel
#2 simple-ds-field.png38.22 KBmikeybusiness

Comments

swentel’s picture

Status: Active » Postponed (maintainer needs more info)

Can you try disabling filefield_paths, it looks like that is the problem. Also, what's the configuration of that field (code, entities etc)

mikeybusiness’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new38.22 KB

Yep. Disabling FileField Paths fixed it. I should have noticed that.

The content type that I had only had one text area and and one link field from the link module and taxonomy. I don't think I was even using FileField Paths directly. At the time that I encountered the problem I had created a new field in DS with php that rewrote the title of the node to link to the link.

The test that I created after I uninstalled DS and reinstalled it was a simple text field. No Code at all.

I don't really know a whole lot about DS yet, but a simple way to recreate the bug is to enable FileField Paths, create a new field in DS and immediately try to delete it. I guess I need to file this report over at the FileField Paths issue queue. See below.

I am using FileField Paths for tokens in other content types. Namely for AutoNodeTitle. The other content type that I have is a simple description text area field and a single upload field and taxonomy.

If you have any additional insight about what is happening, I would be glad to relay it. You can close the ticket though. Sorry for the false alarm, and I appreciate you getting back to me so quick.

mikeybusiness’s picture

As a side note, this was filed over at FileField Paths already.
#1112748: Display suite can't delete custom field due to filefield path form alter

swentel’s picture

Status: Active » Needs review
StatusFileSize
new867 bytes

hehe, funny one, patch attached, should make the error go away. I've closed the issue at filefield paths as this is a really easy fix for me to commit.

Status: Needs review » Needs work

The last submitted patch, 1309280-4.patch, failed testing.

swentel’s picture

Ok, you can ignore the failed test cases, it really does work :) I need to disable this from the testbot queue again.

mikeybusiness’s picture

Wow. Haven't seen a cross patch before. You're the man!

swentel’s picture

Status: Needs work » Fixed

Did a quick test myself, committed and pushed.

Status: Fixed » Closed (fixed)

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