Plugin - Simple blog hangs on 1 of 4 added posts

Post Reply
User avatar
TheDane
Posts: 5
Joined: Sat Jan 09, 2021 3:28 am

Plugin - Simple blog hangs on 1 of 4 added posts

Post by TheDane »

Hi have created my first WonderCMS site and loves the simplicity of WonderCMS, i used the Simple Blog plugin for some of the site.

Standard WonderCMS functions fine, adding/saving/edit.

WonderCMS version 3.1.4 and Simple Blog Installed version: 3.0.9

After update to WonderCMS 3.1.4 i have had the problem that one post out of four hangs when saved (edit existing post) or (fail)saves fast (where the data changes are not saved). The other posts seems to work fine when edited and saved.

Any one who have experienced this problem or in general problem saving in the blog plugin?
User avatar
wiz
Admin
Posts: 540
Joined: Sat Oct 30, 2010 12:23 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by wiz »

Hi TheDane, have a warm welcome to this community.

Thanks for dropping by and reporting this. We've looked into it and it seemes there is indeed an issue, but it seems to be only if Summernote is not installed.
I've opened a GitHub issue: https://github.com/robiso/wondercms/issues/226
and we'll be looking into fixing this.

I'll come back and report when this is fixed, so you should receive a notification.

Please check my next post, asking additional information to be able to reproduce your issue.
User avatar
wiz
Admin
Posts: 540
Joined: Sat Oct 30, 2010 12:23 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by wiz »

@TheDane.

This might seem to be a different bug.
I will edit my previous post to our reflect current findings.

A bug we've managed to reproduce is:
- When Summernote editor is not installed, editing of the blog (blog title, content, description) doesn't seem to work at all.
However blog post creating and deleting works (bug opened here: https://github.com/robiso/wondercms/issues/226)

1. Is there anything specific in that post that might be the issue?
2. Can you try creating a new blog post, then try editing it, and copy/paste some content from the "problematic" blog post?
3. Can you create a backup of your website and try removing the blog post and adding it again, just to verify that page isn't the issue?

What would also help us debug this greatly is:
- What theme and what plugins are you using?
User avatar
TheDane
Posts: 5
Joined: Sat Jan 09, 2021 3:28 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by TheDane »

@Wiz

I tested some more, deleted all content in the problem post.

I found out the problem is when you have a picture inserted, as soon a picture have been added it seems like the Blog is saving but it is not.

When ever the picture is removed from the content, you can save changes again. Also checked another post with a picture in it, same problem - i just did not see this before due to no need for edit/changes. The post with only text works fine.

Standard HTML editor used.

/TheDane
User avatar
wiz
Admin
Posts: 540
Joined: Sat Oct 30, 2010 12:23 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by wiz »

@TheDane

Cheers for getting back and bringing more clarity to the issue. We've pushed the first fix I mentioned earlier - saving without Summernote now works as expected.

However, your issue seems different. It seems to be more of an image size and I think we're close to debugging your issue:
1. Is the image larger than 4MB?
2. You're probably uploading it with Summernote -> which base64encodes the image (turns it basically into text and saves it)? Is this assumption correct?
3. With the image in the blog post, how big (in terms ob KB) is your "simple-blog.json" databse in your "data/" folder?

I suspect your image is large and is being base64 encoded, creating issue.


I tried the following scenarios:
1. Upload and encode image (with and without Summernote editor) -> works without issues.
2. Upload image through Settings -> File manager, and then include it -> works without issues.

If there are no privacy concerns, I would ask you to send over the image in a ZIP file to report@wondercms.com, so we can test the scenario that is happening to you.
User avatar
TheDane
Posts: 5
Joined: Sat Jan 09, 2021 3:28 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by TheDane »

@Wiz

Nope, the picture is uploaded from the CMS and not the editor. So what the BLOG cannot save is simple HTML code for a picture. The picture is the same that once worked with no problem (linked not uploaded), placed under /data/files

The picture is at 165 Kb, and the simple-blog.json is at 6,8 Kb in size.

The picture linked in the html code from the editor is : https://bit.ly/38yGsNK
(used a url shortener to avoid search results).

As soon the picture code is removed from the html code, once again it is possible to save the content.

When i have the time, i will try to make a new install in a subfolder to see if i can re-do the error on the same server.

Update :
Tried to remove the editor completely and updated the BLOG to latest version, and just do all code in HTML - same result with the save/update part and with a picture in the code. So i am not sure what the problem is, will try a new fresh site on another domain (but same server setup) one of these days.

Solved the problem here and now by editing the data file manual, the BLOG have no problem displaying pictutes.
User avatar
wiz
Admin
Posts: 540
Joined: Sat Oct 30, 2010 12:23 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by wiz »

@TheDane

Thanks for getting back with more information.

Just to make sure I have the scenario (where adding the picture doesn't work).
1. You uploaded file through "Files" in the Settings panel?
2. Then you inserted the imagine in your blog post with <img src="URLtoYourImage">.
3. And it didn't save?


Can you please also specify what browser + version you are using?
Since you've dedicated some time to improving WonderCMS already, we'd like to add you to our special list of contributors: https://www.wondercms.com/special-contributors (You can send us over your Name + LinkedIn/Twitter/Your website to hi@wondercms.com).

Looking forward to debugging this and solving the issue.
User avatar
TheDane
Posts: 5
Joined: Sat Jan 09, 2021 3:28 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by TheDane »

Hi @Wiz

Sorry for the delay, I have been away for some days now.

1. Yes, and no - I have experienced the same problem both with upload from the file uploader and from the editor.
2. Yes, I have tried both disabling the editor and to do the code in html and in the editor - same result.
3. Yup, same problem.
4. I was using Chrome in incognito mode to avoid any of my addons to be the problem, but I will test on Firefox and other browsers next.

Any way, I am not done testing yet, but thank you for you time.

I would love to be a contributor to this project, and will get back when I feel more worthy of such by looking at a Danish translation.
User avatar
TheDane
Posts: 5
Joined: Sat Jan 09, 2021 3:28 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by TheDane »

Hi @Wiz

My last test in this round, testing both on the live site and a new test site created just for test. This time used FIREFOX as browser.

Found different errors that I could re-produce more than once.

Live site I recorded this, adding a simple test to the post that are effected of the "saving hang" -> https://ibb.co/r4YhFkG
1. Added the text "TEST" - click on the editor bar to make it save, I know from test that it does not save, but it says so.
2. Clicking in the text again, then clicking on the editor bar again to make it save - and then it saves with a hang.

Test site, I recorded this - was able to produce this crash on the BLOG twice just by adding more than 7 posts -> https://ibb.co/7Q9RLd2
1. Using the clean template it is not possible to edit the first posts in blog, probably due to design VS the BLOG plugin.
2. Added the 8th post and the BLOG crashes total, and is not able to get it to show again. - gets this page after -> https://ibb.co/LkkcHj9
3. When you delete the crashed BLOG plugin, it does not delete the database file - and the error persists. Maybe the database should delete with the rest of the plugin delete - if possible. Else user need to delete with FTP client, and need to know what file.
4. The "saving hang" I could reproduce twice, but haven't had it since on the test site.

Any way, I will close it for now, and move on. If I figure out how I can provoke an error I will get back. Maybe it is my VPS setup that is the problem.
User avatar
wiz
Admin
Posts: 540
Joined: Sat Oct 30, 2010 12:23 am

Re: Plugin - Simple blog hangs on 1 of 4 added posts

Post by wiz »

Hey TheDane, no problem at all, we all have lives so really no sweat for response speed.

I appreciate you coming back with more details.
I would kindly ask you, if you could check what the Console log is returning in your browser when this happens, there should be a telling error which should enable us to debug this easier.

Afterwards I will open a bug report on GitHub if it's somehow WonderCMS or plugin related.

Thank you for the effort you've put into this: we'd still like to add you to our special list of contributors: https://www.wondercms.com/special-contributors. Just send over your Name + social or website and it will be added. :)
Post Reply