I have 2 possibly related issues going on with this module. First, I cannot get the edit option to show up even though I do believe my permissions are set correctly. I have:
- enabled modal cck field on a fieldgroup that has one field in it.
- via cck field permissions my user is in a role that can edit that field and view that field
- my user can edit 'any' of the type of content this field is in
- i'm using domain access module and have also given user permission to 'edit domain nodes'
The edit icon will not show up. But if I remove the:
&& content_access('edit', $field, NULL, $node)
from function _modalframe_cck_editor_fieldgroup_view of file node_view.inc it works. But again, I've triple-check my permissions and that my user is in the correct role. The user has permission to edit and view the particular field that's in the fieldgroup I applied it to, as well as edit the content type itself. Any ideas? Could this be an issue with domain access and this module?
My second issue is that I'm using multistep module. My impression of modal cck was that it only brings up the exact field in the popup. But I'm getting the entire form. However, I wonder if that's because of my access issue above, in that if I remove the line I mentioned then I can get the modal edit option. I'm hoping solving the first issue fixes the second issue, but I just wanted to verify that it's only supposed to bring up that one field and that the use of multistep isn't going to cause problems with it.
Thanks much!
Comments
Comment #1
henrijs.seso commentedsame problem of permissions here. Is it because we use cck field permissions?
Comment #2
henrijs.seso commentedusing cck3 dev
Comment #3
henrijs.seso commentedproblem is in parent.js file :( this line$(elementSelector +':not(.modalframe-cck-editor-processed)', context).addClass('modalframe-cck-editor-processed').each(function() {and in particular elementSelector. if I rewrite line as $('div:not(.modalframe-cck-editor-processed)', context).addClass('modalframe-cck-editor-processed').each(function() { I get icon by every possible div, which is expected... git to hack some more...messed with node template files and node class was missing.
Comment #4
markus_petrux commentedMaybe it is the domain access module that is returning FALSE to
content_access('edit', $field, NULL, $node)? (I do not use the domain access module myself, so I cannot really tell)Theorically, Modal Frame CCK Editor should be transparent to any field/content permissions module. What happens if Modal Frame CCK Editor is disabled? What happens if other field/content permissions modules are disabled?
Comment #5
henrijs.seso commentedI sorted it out, no problem for me now
Comment #6
chadmkidner commentedI am having a similar issue, The edit option or pencil icon is not appearing at all after complete install including required dependencies.
Went to manage fields --> configured --> checked enable and saved No results and no displayed errors.
Comment #7
chadmkidner commentedComment #8
chadmkidner commentedOk so I just tried this on two separate sites with two different configurations Including trying both versions (1.0 and 1.xdev) As well as both versions of the modalframe API. I have jQuery Update module already installed with the most recent version so I downloaded and installed jQuery UI, modal API, and Modalframe CCK editor. No errors, installed just fine. So I chose I node type and applies the changes to its fields configuration. Went to an associated node and nothing. Also refreshed cache, ran cron and updates just to be sure.
Is anyone else experiencing this or have a suggestion to what I may be missing? Thanks.
Comment #9
vishun commentedJust to reiterate what was said/edited in #3 by mansspams -- It is possible that this module may not appear to be working for you because you might be missing a parent element with the class of "node" and/or your field lacks a parent element like "field-field-some-field". If you look at the source of the page and search for "modal" you should eventually find the inline javascript provided by this module and you will notice it has element selectors like ".node .field-field-some-field". If your markup does not have either parent elements, this module will not properly add the pencil edit icon.
The default node.tpl.php commonly has a class of node but if it does not, this will cause an issue. Since we were using a custom template, it was lacking this node class. As a resolution I simply added a body class via template.php and mytheme_preprocess_page like so:
The above only works if you are already utilizing a $body_classes variable in your page.tpl.php like:
Otherwise, just make sure that your node template has an element with the class of "node" and that your target field has the expected common field wrapper of "field-field-some-field" like: