[1.5.7] Excerpts are gone

Hello

Strange, all excerpts in the Admin UI are gone, page and blog mode.

I started with a fresh installation trying to add some content. If i choose a page to re-edit, the previous added excerpt is no more visible.

Any ideas?

Cheers

Martin

Weird. I can’t replicate

It is weard :wink:

This installation started with a version 1.5.6 to continue developing my code. Unfortunately I hadn’t time for this and after a month i ran the updater.
I prepared the site after the upgrade.

I checked the content of the database: The added excerpts are not stored in the tables .cb_entry or .cb.page

Cheers

Martin

Perhaps a permissions issue?

Curt

Hi Curt

My file editor.cfm in the folder contentbox-admin\views\entries is completely different. I compared also other files, also completely different. The files at Github are much more bigger. editor.cfm at Github: 223145 versus 18062 Bytes. My file ist the same as in the actual zip file from github.

Cheers

Martin

Hmm, it would seem something happened during install/upgrade then as it doesn’t look like you have the latest files. What if you replace them?

Curt

Hi Curt

I compared the content of the zipfile from Github with my installation. All files are the same. Strange, that the unziped files at Github are not the same as the official release.

Cheers

Martin

I found something interesting:

After adding an excerpt and hitting the save-button, the excerpt will be saved. Going the direct way by hitting “Publish”, the excerpt will not be saved.

Scenario:

  • Add a new page including an excerpt.
  • Hit “Publish”
  • Edit the page. No excerpt.
  • Add the excerpt. Press “Save” and “Publish”
  • Edit the page. Excerpt is available.

Cheers

Martin

Martin,

The only time that I have seen an issue when saving a page or post, is when there is something happening with the Ajax call itself. Try using Chrome Tools or IE Tools or fireBug to see what is happening with the Ajax call.

It may be a simple case of an error being thrown.

Save and Publish are returning a 200 success. For which more specific information i have to look?

Ok is this an upgrade from V1.5.5 or fresh install of V1.5.7?

This is an upgrade from 1.5.6 to 1.5.7.

I found the same issues.
The rest of the PUBLISH works, but the excerpt seems to be missing from the saving routine.

If I edit and then PUBLISH the excerpt changes are not saved.

If I edit and then Save the excerpt changes are saved.
BUT - if you use Save or Quick save… the Entry details are not updated.
It still says published, which is no longer true, and it is not the PRETTY PINK that warns you that you have to publish to actually get the entry back on the site.

Clicking Draft in the right hand side has the same affect as publish… it posts the form and redirects, but DOES NOT SAVE the Excerpt, but it does save the content.
So there seems to be a different in the ajax quicksave() function, compared to actually posting the form.

Its late, so I’m not seeing where it is… but its definitely happening.
For the record, this is a fresh install of 1.5.7, the latest.

Can you tell me the steps in order to verify please. I think this is solved already.

Luis

Hey Luis… did a lot more debugging, and I found the MISSING PIECE of the puzzle.

Last night, Chrome was being a brat, so I fired up firefox.
Thats the key, Chrome has no issues, Excerpt update works no matter what, but in Firefox 25, it happens.

Last night, I would go to Content > Blog
Find the Entry I want to edit, and click the Quick Menu for the Entry, and click Edit from the drop down menu.
I scroll down to excerpt, add a word to the end, like TEST, and click PUBLISH.
Click edit again, and it didn’t save.

If I edit and click SAVE or click DRAFT, and then Publish, then it saves.
But if you edit, change excerpt, and then just click Publish, it does not update.

Works fine in Chrome… but it was happening in Firefox… everytime.
I’ll check initial posts in Firefox too… I think it happened there too (from memory).

As for the reason, I’m not sure if its the nested forms on the page, thats the only thing that seems like it would be a browser issue… but not sure. It is definitely a strange thing.

I’ll check the other UX issue I had, but thats just UX, and not data saving… I’ll see if thats just Firefox too.
I’ll let you know.

hope this helps.

Confirming, a NEW BLOG POST fails to save the Excerpt in Firefox too.
Works fine in Chrome, but Firefox never saves the excerpt, unless you use the Save or Draft buttons which is an AJAX call, so it must have something to do with the way the browser posts it, compared to the way JavaScript does via Ajax.

Hope this helps.

Have you noticed if any of this is showing errors in the fireBug console?

The ajax works fine, so nothing in Console.
And the button I am pressing is just a normal SUBMIT button, which submits the form.
I don’t see any script which binds on that button… so I assume its a normal post, but the forms do nest in the page, so thats why I wondered if that might be it.

HTML 5 still says you shouldn’t nest forms, maybe thats the issue… but I don’t know why that is the only effect I have seen.

I’m on a mac, if that makes a different to the Firefox builds.
I know how to make it work, but obviously, might be an issue for others.

Try and let us know if anyone else can reproduce it.

@Gavin

I’m seeing the same thing on my Mac–works fine in Chrome, not in Firefox. I think the issue is that for some reason, the hidden field for excerpt is not getting updated before the form is submitted.

I added the following to contentbox-admin/views/_tags/editors.cfm in the setupEditors() method, in the submitHandler:

// if excerpt, update it as well

if( withExcerpt ) {

CKEDITOR.instances.excerpt.updateElement();

}

Try it out and see if it resolves the issue. If so, I’ll submit a pull request.

Thanks!

Gavin,

I fixed the issue now in development. I added more required methods to the JavaScript interfaces to implement editors now:

getEditorExcerpt()
updateEditorContent()
udpateEditorExcerpt()

As each editor can implement it differently. Anyways, this works now and a new feature arose :slight_smile: WOOHOOO!!

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano