CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12635] Apply button is shown for non-existing page and creates new pages

avatar
Created By: Daniel Brito (DanielBrito)
Date Submitted: Fri Jul 28 04:49:33 -0400 2023

Assigned To: Fernando Morgado (JoMorg)
Version: None
CMSMS Version: 2.2.16
Severity: Major
Resolution: Fixed
State: Open
Summary:
Apply button is shown for non-existing page and creates new pages
Detailed Description:
When creating a new page and choosing a template the apply button is shown. When
the apply button is pressed a page is created which is good. But when I press
the apply button again a new page is created. This will continue until i press
the submit button or reopen the created page.

Steps:

- create new page
- Change template
- - Page is reloaded with new template
- Apply button is shown right away
- I press on apply and a page is created

I made changes to the following code to solve this:

\modules\CMSContentManager\templates\admin_editcontent.tpl Lines 217 & 220

change the if statemant from 

    $content_id != ''

to

    $content_id >= 1


History

Comments
avatar
Date: 2023-08-09 18:45
Posted By: tom (tomphantoo)

A new version of the module, including changes like the ones you've suggested
(>0 instead of >= 1) is in the works.
      
avatar
Date: 2023-08-24 05:19
Posted By: Michael Stegbauer (goldfloppy)

The problem also affects the copy action with somewhat strange but much worse
consequences.

Steps: (tested in 2.2.17 and 2.2.18)
- Click copy on a page
- Click Apply => new page is created
- Click Save => !!! this overwrites the current default page !!!

The mentioned change in admin_editcontent.tpl solves this problem too.

      
avatar
Date: 2023-10-03 06:35
Posted By: Fernando Morgado (JoMorg)

Fixed in SVN, thanks for the heads up.
      
Updates

Updated: 2023-10-03 06:35
resolution_id: 6 => 7
severity_id: 1 => 2
assigned_to_id: 100 => 12532

Updated: 2023-08-09 18:45
resolution_id: => 6