Development

#3481 ([PATCH] slot name 'content' or 'type' may bug the in place editor)

You must first sign up to be able to contribute.

Ticket #3481 (new defect)

Opened 5 months ago

[PATCH] slot name 'content' or 'type' may bug the in place editor

Reported by: onanga Assigned to: francois
Priority: minor Milestone: plugins
Component: sfSimpleCMSPlugin Version: 1.0.13
Keywords: slot_content, slot_type Cc:
Qualification: Unreviewed

Description

Issue :

Having something similar renders a small edit in place bug :

<?php sf_simple_cms_slot($page, 'first_slot', 'first slot default content', 'RichText') ?>
<br />
<?php sf_simple_cms_slot($page, 'content', 'Contenu', 'RichText') ?>
<?php sf_simple_cms_slot($page, 'type', 'Contenu', 'RichText') ?>

Cause :

I called one slot "content", and that will make some <div id="slot_content"> tag, same for "type" slot that will output some <div id="slot_content">.

Source of issue :

Simplecms slots has a form with a select box to choose a type for that slot (RichText?, simpleText, PHP, etc).

This form includes input items that have ids "slot_type" ans "slot_content" :

<select name="slot_type" id="slot_type">...
<select name="slot_content" id="slot_content" style="display:block;">...

Solution :

- Don't ever call your slots "content" or "type", but that is quite restrictive.
- Or apply the below patch :
modify /sfSimpleCMSPlugin/lib/helper/sfSimpleCMSHelper.php for not generating slots with id "slot_".$slot, but generating instead "simplecmsslot_".$slot.
- Or replace your /sfSimpleCMSPlugin/lib/helper/sfSimpleCMSHelper.php with the one attached

Attachments

sfSimpleCMSHelper.php (4.2 kB) - added by onanga on 05/06/08 11:15:09.
Patch for slots called "content" and "type"

Change History

05/06/08 11:15:09 changed by onanga

  • attachment sfSimpleCMSHelper.php added.

Patch for slots called "content" and "type"