Download & Extend

Does not work with images (and other fields)

Project:Add and Reference
Version:master
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Add and reference module will not work with image node type (and some other types). I had a quick look at the code and saw that the problem is in line 74

<?php
   
if (!empty($value) && user_access("create $child_type content")) {
?>

It chechs for user's permissions and since permissions for images are not set as "create image content" but "create images" this code will not work.

I made a quickfix but this is definitely not a long-term solution since other content-types might also have different names for access permissions.

<?php
   
if (!empty($value) && (user_access("create $child_type content") || user_access("create $child_type" . "s"))) {
?>

P.S. I hope I was clear enough with my lousy english.

nobody click here