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.

 

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