Closed (fixed)
Project:
Display Suite
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2013 at 12:48 UTC
Updated:
13 Feb 2013 at 14:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedMicrodata also requires attributes on the field item wrapper for string and entity reference type fields.
Comment #2
swentel commentedSo, the most breaking part is that DS also has its custom fields, which are themed through theme_field(), but are not actually Field API Fields, this breaks edit completely.
A quick fix *could* be this, cf patches attached, also required for edit. This way, it doesn't break anymore and you don't get the 'The requested page could not be found.' popup anymore. Field API fields work with this, haven't checked with the pseudo fields yet, but that requires some changes in DS anyway.
Second problem is that it is possible to select different field templates. By default it's using theme_field(), but DS adds the ability to change these, sometimes using no wappers at all. I haven't tested with that yet. I guess that part can only be fixed in DS itself with a
module_existscheck.Comment #3
swentel commentedProof of concept to make the title pseudo field work as well if it's rendered as a DS field.
Comment #4
swentel commentedsupport for title, author and created date.
Comment #5
swentel commentedSo the ds_edit_support() function (which could probably have better name, not sure), should also check the 'Access inline editing' permission I guess.
Comment #6
nod_umm we're outputing the markup even for users who don't have the permission in the edit module, we should probably use that too.
Comment #7
nod_Committed the edit part of this.
Comment #8
swentel commentedCommitted to DS 2 branch, will leave first branch as is for now.
Also, do you think we could create a patch for the '#skip_edit' property, although I can think that Wim won't like this one, I'll ping him in IRC for it :)
Comment #9
wim leersWhy would that property be necessary? :)
Comment #10
swentel commentedSame as I had in testing DS in D8 - My Display Suite fields - which are not Field API fields - are themed through theme_field() so you get consistent markup. At that moment the attribute is also added, but edit chokes on it because it simply has no idea what this field is.
It's a quick stopgap fix in a way, but I had no better idea for this :)
Comment #11
Anonymous (not verified) commentedAs mentioned above, it isn't just Edit module that depends on hook_preprocess_field to place field-specific attributes. RDFa and microdata also rely on this. I know this issue is for D7, but just want to say that I hope we are not considering an Edit-specific stopgap for D8.
Comment #12
wim leersIMO this is a bug.
You should introduce
theme_ds_pseudofield()or something similar, because you're implicitly breaking an API here: you're invalidating the assumptions developers can make abouttheme_field()and thus consequentlyhook_preprocess_field().This would also address @linclark's concerns, I think.
Comment #13
swentel commentedThat would mean I have to rewrite everything and that's not an option for the D7 version :)
Yeah, maybe using theme_field wasn't the smartest option, maybe I should have just called theme_field() directly in my own theme function so the preprocess functions are skipped. I'll think about that for D8.
- edit - meh, directly calling theme_field is a problem as well as that's not reliable.