October: Static page Repeater fields data doesn't saved properly after a field is deleted.

Created on 21 Jun 2019  路  12Comments  路  Source: octobercms/october

  • OctoberCMS Build: ### 455
  • PHP Version: 7.2
  • Database Engine: MySQL
  • Plugins Installed: Rainlab.StaticPages

Description:

I'm using a simple repeater variable on static page:

{repeater name="content_sections" prompt="Add another content section"}
<h3>
{text name="content_header" label="Content section" placeholder="Type in a heading and enter some content for it below"}{/text}
</h3>
<div>
{richeditor name="content_body" size="large"}{/richeditor}
</div>
{/repeater}

On static pages backend i create one static page and using repeater field i create 2 fields. Everything works ok, but if i delete one field and create a new one i get wrong data on save. As you can see on sample video, the problem starts when you delete one field. If you delete one field you have to close the page and reopen it to be able to add more fields without a problem. I test it on a clean install with latest build.

I also noticed that after you delete the first field, the new field you create has filled fields and the data are the same with the first one. You can see it clearly on the video sample.

Screenshot

Steps To Reproduce:

  1. Create one repeater variable on static page layout
  2. Create one static page
  3. Create 2 repeater fields and save page
  4. Delete first repeater field
  5. Create a new repeater field and save page
  6. Wrong data saved on content file. Only one field data saved.
Completed Bug

All 12 comments

Confirmed. This will have to fixed in the Static Pages plugin, I believe.

Do you mean Static Pages Plugin?

@haralake Sorry, brain snap! :P Yep, the Static Pages plugin.

To many plugins out there i guess.. : ) .So do i have to create a new issue for Static Pages plugin?

@haralake That's fine, I know where the issue is. Will hopefully sort it out soon.

@bennothommo that's great news!

@haralake Would you mind testing PR #4424 and see if this resolves the issue for you?

@bennothommo I test PR #4424 and i confirm it resolves the specific issue.

@haralake thanks for confirming :D

Fixed as of 3eac212.

Hi guys, thanks for your extended work on this bug. When would the bugfix be available as an update in the backend of October CMS?

Hi @maartenmachiels, you could use a Dev build or wait for a next release - v1.0.457 (should be soon). We're currently working on the issues/prs to make it happened!

Was this page helpful?
0 / 5 - 0 ratings