Inline editing problems

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/10/2013 2:47:22 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Inline editing problems

I love the new inline editing feature, in theory!  But I've found a couple of issues meaning I've had to switch it off again.

1.

With Content Workflow switched on, it fails to save any changes. I have repro'd this on the demo site. I imagine it should update the live content.

2.

Without Content Workflow switched on, it is mangling the html content on my site. Again I've repro'd this exactly on the demo site. For example, I started with this html:

<p>This&nbsp;web&nbsp;site&nbsp;is designed to support all&nbsp;users and&nbsp;system administrators&nbsp;of the Historic Buildings, Sites and Monuments Records (HBSMR)&nbsp;system from&nbsp;<a href="http://www.esdm.co.uk" target="_blank">exeGesIS&nbsp;SDM</a>.&nbsp;&nbsp;It is&nbsp;organised into two main sections, a <a href="/user-guide">user guide</a> describing&nbsp;how to operate the HBSMR application, and&nbsp;&nbsp;a <a href="/administration-guide">system&nbsp;administration guide</a> covering&nbsp;configuration of the system, advanced functionality,&nbsp;and management of reference data sets.</p>

Then I clicked the anchor and types "test." at the end of my paragraph. I clicked out of the content area to trigger the save. I then refreshed the page (F5), and the html had turned into this:

<p>This&nbsp;web&nbsp;site&nbsp;is designed to support all&nbsp;users and&nbsp;system administrators&nbsp;of the Historic Buildings, Sites and Monuments Records (HBSMR)&nbsp;system from&nbsp;SDM.&nbsp;&nbsp;It is&nbsp;how to operate the HBSMR application, and&nbsp;&nbsp;administration guide covering&nbsp;configuration of the system, advanced functionality,&nbsp;<a href="http://www.esdm.co.uk" target="_blank">exeGesIS&nbsp;organised into two main sections, a </a><a href="/user-guide">user guide</a> describing&nbsp;a <a href="/administration-guide">system&nbsp;and management of reference data sets. test.</a></p>

I cleaned out all the "&nbsp;" from the starting html, and then the editing worked fine, so I hope that helps find the bug. I tested this in IE9 and Chrome - same result.

3/11/2013 8:15:49 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Inline editing problems

Another issue found on the demo site... If the user clicks the padlock to unlock some content, makes edits, then re-locks the content, their edits up to that point are not saved. Saving only seems to occur if the user clicks out of the content while the padlock is unlocked.

I don't know much much of this is controlled by CKEditor and how much by mojoPortal, but it seems to me that it should commit the save when the user re-locks the content.

Some kind of visual indication of unsaved edits would be useful in this respect, if possible.

3/11/2013 12:41:05 PM
Gravatar
Total Posts 18439

Re: Inline editing problems

I'm getting mixed results depending on the browser used on the demo site.

How it should work when workflow is enabled is that you must pay attention to the dropdown in the admin toolbar for Work In Progress vs Live Content. If Live Content is selected it should edit live content. If Work in Progress is selected and there is no current draft when you edit then click out of the editor it should create a new draft and then it should refresh the  page which is needed in order to show the workflow icons. This refresh should only happen when creating a new draft not when editing an existing one. In Chrome this is happening for me on the demo site but in Firefox I am getting the same result as you, the content it not updated and no draft is created and no errors are logged. I'm going to have to dig deeper into that one but wanted to mention how it is intended to work. The good news at least is that the Firefox problem is reproducible on my local machine which is helpful when trying to figure out why it is happening.

As far as the lock icon I knew that problem exists. I've tried to make it work but haven't had much luck. The content save is triggered by the onblur event of the editor but for some reason clicking the lock toggle seems to prevent that event from completing and it tears down the editor before the content can be saved. Most of the work on this was done using CKeditor 4.0.1 but then they released 4.0.2 just before I shipped the mojoPortal release so I updated to that. I will have to try again to make it save before tearing down the editor.

I'm not sure about the mangling of content I would not expect that to be different using inline editing vs using the edit page, historically there have been weird issues with the wysiwyg editors mangling things from time to time because they try to cleanup the markup. I can only fix bugs actually caused by mojoPortal code I can't really solve bugs in the editors themselves. I update to new versions of them when they are released and some bugs get fixed and new ones appear sometimes.

3/11/2013 1:23:22 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Inline editing problems

Thanks Joe.

Just to confirm that the mangling only occurs using the inline editing. Making exactly the same change to the same html in the normal editor doesn't mangle. You can replicate this using the html I posted. The changed html gets posted correctly from the editor (looking at the ajax post in fiddler) but it apparently gets mangled when passing through the HtmlEditService.aspx handler to the database.

3/12/2013 9:26:20 AM
Gravatar
Total Posts 83
-- Joe

Re: Inline editing problems

Another issue I have encountered - locally and on the demo site - is the "lock" icon suddenly dissapearing after an edit/update.  I have not been able to get the icon back even when closing my browser and then opening/reconnecting.

 

3/12/2013 12:36:19 PM
Gravatar
Total Posts 18439

Re: Inline editing problems

Crispin,

I don't understand the steps to produce the content mangling problem. When using the inline editor there is no raw html view so there is not a way I can copy that html and paste it in.

Any clarifications of how to produce it would be helpful.

Thanks,

Joe

3/12/2013 3:44:48 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Inline editing problems

Sorry - I wasn't clear... first enter the html using the normal edit process. Then use inline editing to add the word "test" to the end, and click out of the content to trigger the save. Refresh the page to see the garbled result.

3/13/2013 1:46:28 PM
Gravatar
Total Posts 18439

Re: Inline editing problems

Ok, I think I have solved the content mangling problem. I've updated the demo site, can you try it and let me know if you agree that problem is fixed?

3/13/2013 2:41:03 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Inline editing problems

Yes that has fixed it for that particular example, but I'm not sure how to do a more thorough test as I couldn't deduce the logic governing what html might get mangled or not. It had something to do with the entity references and anchors. Happy to test more if there are risk areas.

We'll give it a go on a production site (assuming you are going to put out a hotfix!) and report back if there are any problems.  But, the issue with it not saving if the user clicks the padlock without first clicking out of the content, plus the content workflow thing, do still compromise what will be a very impressive feature. Also I am finding the padlock goes walkabout in strange ways, perhaps explaining what Joe Vago reported. For me it just appears in different places (vertically) for no apparent reason.

3/13/2013 3:44:57 PM
Gravatar
Total Posts 18439

Re: Inline editing problems

I'm pretty confident that the fix for the mangled content is really fixed.

I will patch the release but I'd like to try to solve some of the other issues with it first.

Before I looked into that one I briefly looked into the problem with worklfow editing a draft. That one has not been possible for me to reproduce it reliably yet. I've definitely had it happen but when I try to debug it always works correctly so far. Could you check that one on the demo site and see if it possibly could have been fixed as a side affect to the other fix?

I also want to try again to solve the issue about it not saving if you click the lock immediately after editing before I put out a patch.

It would be nice if I can find a good solution for the edit toggle squirrely positioning. I'm using the new jqueryui position method to put it at the top left corner (I've tried other positioning as well) but it is definitely not behaving in any consistently. I was trying to use it with the jqueryui icon but I may have to find something else. I have also tried putting it in the same place as the other edit icons without using jqueryui.position but just using the jqyuerui icon but it always seems to force a line wrap in the heading and if I try to override it to display:inline or inline-block to fix that it breaks the jqueryui icon for some weird reason. Right now I'm leaning toward putting it in the heading with the other icons and just find some other icon to use.

Edit: corrected the link and text I meant jqueryui position not jquery.position.

3/13/2013 5:10:39 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Inline editing problems

Content workflow. Inline editing when the page is displaying "Live content" works fine for me. When the page is displaying "Work in progress" but there is no existing draft, it doesn't work: for some reason, clicking out of the edited content triggers a GET on the page itself, instead of a POST of the changed content. When the page is displaying "Work in progress"  and there is already a draft version, clicking out of the edited content triggers a POST to HTMLEditService.aspx and saves correctly.

Padlock closed after editing but before saving: the problem remains, blocking the save, in both IE9 and Chrome.

Lock/unlock icon: positioning  this with the other links seems sensible.

 

3/14/2013 10:33:52 AM
Gravatar
Total Posts 18439

Re: Inline editing problems

Ok, can you try again on the demo site and see where we stand. I'm guessing that the draft edit problem was happening because the ajax post was asynchronous and the page reload was happening before it could complete some of the time, so I hooked up a callback function so it only refreshes the page after the ajax post has completed.

I also managed to get the jqueryui lock icons to behave correctly in the the title with the other icons. The result of that is the lock is obscured from view when the editor is launched so it is no longer possible to click to lock it again until clicking outside the editor so it should no longer prevent saving data.

3/14/2013 11:33:58 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Inline editing problems

A quick test on the demo site suggests everything is resolved and working well. If you are releasing this as a patch we'll now definitely put it onto some sites and give it more thorough tests - it will be very popular I'm sure.

The only minor question remaining for me is... when editing Work in Progress with Content Workflow switched on, and no draft already existing, this creates a draft and does a round trip page refresh, which is slightly unexpected and alarming when using the inline editor. It's OK, but user expectations are immediately raised by the inline editing!  I wonder if there's any way to reveal the draft status icons without a round trip?

3/14/2013 1:24:22 PM
Gravatar
Total Posts 18439

Re: Inline editing problems

Ok, the 2.3.9.6 release has been patched. See the notes on the codeplex download page about which files have been modified since the initial release.

Showing the workflow icons for a newly created draft without reloading the page is a tall order, it ain't gonna happen, sorry.

Best,

Joe

3/18/2013 8:58:09 AM
Gravatar
Total Posts 83
-- Joe

Re: Inline editing problems

Joe,

I downloaded the patched version of 2.3.9.6 and the inline feature is working well!

Also, I like moving the "lock" icon to the header bar with the Settings and Edit links.  That makes more sense to me.

Thanks again for all you do!

-- Joe

3/18/2013 9:27:26 AM
Gravatar
Total Posts 18439

Re: Inline editing problems

Thanks for the beer Joe! Much appreciated.

Cheers,

Joe

4/2/2013 3:58:00 PM
Gravatar
Total Posts 128

Re: Inline editing problems

I've found another minor issue, reproduced on the demo site (https://demo.mojoportal.com/new-page).

Editing inline does not update the "Modified by" property of HTML Content. It does appear to update the date. The entries in the "Previous Versions" history are similarly wrongly attributed, perhaps to the user who first created the content (I've not exhaustively tested the illogic here).

This is without Content Workflow, but I've seen the same issue on a site with this switched on.

PS totally unrelated...  logging in on this site with a Windows Live account seems to have been broken for a while. This time, the popup appeared where normally I have to re-confirm for the Nth time that I am happy to share information for 1 year (grr!), but instead it said:

Allow Access

There's a problem with the site you are trying to share your information with. Please try again later.

You must sign in to post in the forums. This thread is closed to new posts.