Layout and/or Version BUG - Can You Confirm?

Permalink
I've noticed the following serious layout issue…

Add a new 3-column 1-row (default) layout to a page. Add content to each cell (just a single word using the content block will suffice). Then exit edit mode and publish the changes. The layout looks fine.

Now go back into edit mode and edit the layout. Change the number of columns from 3 to 2. Exit edit mode and publish the changes. The change is not reflected on the page - i.e. the layout still has 3 columns.

Now, once again, go back into edit mode and this time click the versions button. View the previous version by clicking the link. Notice that the previous version has two cells! The previous version should in fact be the current version of the page!

Can anyone confirm this behavior before I submit a bug report?

Thanks,

-Steve

Shotster
 
Tony replied on at Permalink Reply
Tony
i've seen this kind of thing before when the page wasn't approved. this sometimes happens when you're editing two pages at once.
Shotster replied on at Permalink Reply
Shotster
Thanks for the reply, Tony.

Perhaps I'm not understanding what you mean, but I'm logged in as admin, and I click "Publish My Edits" after editing the layout, so the page is definitely approved. However, even if the page wasn't approved, I should see the latest version when I'm logged in, right? Yet I don't immediately after updating the page.

As for editing two pages, I don't think that's the case. I'm not even sure how to do that. Besides, I've reproduced the issue on a virgin install of C5.

Anyway, it's simple enough to reproduce with the steps I've outlined above, so if you or anyone else can't reproduce it consistently as I can, then perhaps something's awry with my setup. It's quite a setback for me, as the site has been designed around my client being able to change the layout on the home page back and forth between 3, 2, and 1 cell.

:-/

-Steve
Tony replied on at Permalink Reply
Tony
i just followed your steps in concrete5.4.0.6, but I couldn't replicate the problem. what version are you running?
Shotster replied on at Permalink Reply
Shotster
I'm using 5.4.0.5. Thanks for checking, Tony. I'll try again with a clean install.

-Steve
Shotster replied on at Permalink Reply
Shotster
By the way, Tony, where did you get version 5.4.0.6? I don't see it available in the SVN repo. Even the C5 dashboard says that 5.4.0.5 is the latest.

-Steve
Shotster replied on at Permalink Reply
Shotster
> i just followed your steps in concrete5.4.0.6, but
> I couldn't replicate the problem.

Well, I just tried with a clean installation of 5.4.0, and the problem is there. I'll number the steps needed to reproduce the problem, just so it's easier to follow...

1) Add a new 3-column 1-row (default) layout to a page.

2) Add content to each cell (just a single word using the content block will suffice).

3) Exit edit mode and publish the changes.

Note that the layout looks as it should - i.e. one row, three columns. Now proceed as follows...

4) Go back into edit mode and edit the layout.

5) Change the number of columns from 3 to 2 and save changes.

At this point, the change is not reflected on the page - i.e. there are still 3 columns when there should be 2. But go ahead and proceed to step 6 anyway.

6) Exit edit mode and publish the changes.

Again, there are 3 cells when there should be only 2.

7) Go back into edit mode.

8) Click the Versions button.

9) Click the previous version - i.e. the one just below the approved version (second from the top).

Note that it contains two cells - i.e. it should actually be the current approved version. HOWEVER, even if that 2-column version is approved, it STILL is not reflected on the page. There are still three cells! Something is awry with layouts and versions.

Can anyone else reproduce this? Again, this is a clean install of 5.4.0, but I discovered it in 5.4.0.5.

-Steve
Tony replied on at Permalink Reply
Tony
you're right on this. I tested it again and can now reproduce the issue. The first test I had edited the layout twice, which seems to avoid the problem.

It seems like a new version of the page is being created with the edit, but that new version isn't loaded when the page refreshes. Doing some more testing on it...
Tony replied on at Permalink Reply
Tony
I just committed a possible fix for this to svn. could you test it out to see if you notice any other problems with it:http://svn.concrete5.org/svn/concrete5/...

Thanks - Tony
Shotster replied on at Permalink Reply
Shotster
Thanks for looking into it, Tony. Assuming I should be pulling the fix from branches/development/5.4.1, it does not appear to be fixed. I quickly ran through the steps to reproduce the problem, and the 3 cells remain in the edited layout which should have only 2.

HOWEVER, this time it appears the two cells were added to the layout above the one I was editing - i.e. what was the main content before I added the initial layout.

I don't have time to poke around further right now, but hopefully that points you in the right direction.

-Steve

p.s. I've been starting with a fresh install with the default content/theme and adding my initial layout to the "Main" area (below the YouTube video).
Tony replied on at Permalink Reply
Tony
weird, I was dreaming about this last night. anyway, I just checked in another change (addressing a problem with multiple layouts in the same area). Can you do an update and try it out again?
agedman replied on at Permalink Reply
agedman
Hi Tony,
I'd like to help test your patch, but could you be more specific about the svn branch and file(s) that contain the patch? I tried comparing block_area_layout.php from the 5.4.1 branch with my 5.4.0.5 install, but after changing from short tags to long, there were no differences... Do I need to be a Beta tester before I can see the 5.4.0.6 branch?
Shotster replied on at Permalink Reply
Shotster
agedman, the changes for the fix appear to have been in concrete/startup/process.php.

As for 5.4.0.6, as Mnkras points out, it's in trunk/web, which I guess means it's not [yet] an "official" release.

-Steve
Shotster replied on at Permalink Reply
Shotster
> weird, I was dreaming about this last night.

Well, I hope you logged your hours. You should get paid for your REM.

> Can you do an update and try it out again?

Bingo! Looks like you got it! Thanks much, Tony!

-Steve
Mnkras replied on at Permalink Reply
Mnkras
by the way the 5.4.0.6 is in the trunk folder, ;)
agedman replied on at Permalink Reply
agedman
Thanks, Steve and Mike for pointing me in the right direction... I applied the patch, and changing the number of columms is working for me now too. Thanks Tony -- great work!