Development

#3158 ([PATCH] sfSimpleCMS - addPage dash error (Make page path consistent))

You must first sign up to be able to contribute.

Ticket #3158 (new defect)

Opened 9 months ago

Last modified 1 month ago

[PATCH] sfSimpleCMS - addPage dash error (Make page path consistent)

Reported by: exien Assigned to: Kris.Wallsmith
Priority: minor Milestone: plugins
Component: sfSimpleCMSPlugin Version: 1.0.10
Keywords: alphanumeric characters, create page, validator Cc:
Qualification: Unreviewed

Description

From the /sfSimpleCMSAdmin/list page, the plugin fails to create a new page with a dash "-" in the path name. It says the error is "A path can only be composed of alphanumeric characters and - _ / ."

It works when editing a created page because the regex validation is different there.

The following shows what needs to be changed to make the path naming regex validation consistent in sfSimpleCMSAdmin and sfSimpleCMS

+++ sfSimpleCMSPlugin/modules/sfSimpleCMSAdmin/validate/addPage.yml (working copy) @@ -12,7 +12,7 @@

column: slug unique_error: A page with this path already exits

sfRegexValidator:

- pattern: '#[a-zA-Z0-9\.-_/]*$#' + pattern: '#[a-zA-Z0-9-_/]*$#'

match: true match_error: A path can only be composed of alphanumeric characters and - _ / .

Attachments

addPage.yml (475 bytes) - added by onanga on 04/10/08 09:23:30.
PATCH file

Change History

03/19/08 01:28:40 changed by exien

This is what I meant to say:

+++ sfSimpleCMSAdmin/validate/addPage.yml	(working copy)
@@ -12,7 +12,7 @@
       column:         slug
       unique_error:   A page with this path already exits
     sfRegexValidator:
-      pattern:        '#^[a-zA-Z0-9\.-_/]*$#'
+      pattern:        '#^[a-zA-Z0-9-_/]*$#'
       match:          true
       match_error:    A path can only be composed of alphanumeric characters and - _ / .

04/10/08 09:22:20 changed by onanga

  • keywords set to alphanumeric characters, create page, validator.
  • summary changed from Make page path consistent to [PATCH] sfSimpleCMS - addPage dash error (Make page path consistent).
  • milestone set to plugins.

PATCH :

replace your plugins/sfSimpleCMSPlugin/modules/sfSimpleCMSAdmin/validate/addPage.yml content with this :

fillin:
  enabled: on
  param:
    name: cms_tools_create_page

fields:
  slug:
    required:
      msg:            Please enter a path
    sfPropelUniqueValidator:
      class:          sfSimpleCMSPage
      column:         slug
      unique_error:   A page with this path already exits
    sfRegexValidator:
      pattern:        '#^[a-zA-Z0-9\.\-_/]*$#'
      match:          true
      match_error:    A path can only be composed of alphanumeric characters and - _ / .
  

04/10/08 09:23:30 changed by onanga

  • attachment addPage.yml added.

PATCH file

10/31/08 19:35:38 changed by Kris.Wallsmith

  • owner changed from francois to Kris.Wallsmith.