Add Template breaks if no node types are available

deviantintegral - January 12, 2009 - 03:17
Project:Skeleton outlines
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

If no node types are enabled for a user, the "Node type" select is empty and a warning is thrown:

warning: Invalid argument supplied for foreach() in /Users/andrew/Documents/workspace/amerispec/includes/form.inc on line 1416.

The form should check to see if at least one node type is available, and if not throw a graceful error.

#1

deviantintegral - August 27, 2009 - 18:50
Status:active» fixed

Making this feature respect content type permissions ends up becoming very complicated for end users. For example, if we don't allow users to create templates for content types they can't create, what about creating skeleton instances?

The simplest solution is to allow users with the 'configure skeleton outlines' permission to create templates of any type, since if the permissions are required another user with permission to instantiate the skeleton can check things over. I've attached a patch which I'll be committing shortly.

AttachmentSize
357500_remove_create_check.patch 759 bytes

#2

System Message - September 10, 2009 - 19:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.