×
Kunena 5.1.18 Released (30 Jun 2020)

The Kunena team has announce the arrival of Kunena 5.1.18 [K 5.1.18] which is now available for download as a native Joomla extension for J! 3.9.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1.

Solved Image modal window submit button saves post

More
3 years 10 months ago #1 by greg1
Hi!

I have 2 sites one with K 5.0.0, other was upgraded to 5.0.1.

The first one works fine.
But in the K 5.0.1 one, if I use the picture button, and push submit, it immediately saves the post.
Tried it with new post and by editing old posts, same happens: picture is not updated, or placed in the post, but the post gets saved.

Any idea how to fix this?
Should I try to reroll to 5.0.0?

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #2 by 810
could you add the kunena report, and could you create a demo account, so I can see the issue

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago - 3 years 10 months ago #3 by greg1
This message contains confidential information


This message contains confidential information

Database collation check: The collation of your table fields are correct

Joomla! SEF: Enabled | Joomla! SEF rewrite: Disabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 30 seconds | Max execution memory: 64M | Max file upload: 48M

Kunena menu details:

Warning: Spoiler!

Joomla default template details : ja_playmag | author: JoomlArt.com | version: 1.0.0 | creationdate: 01 July 2014

Kunena default template details : Crypsisb3 | author: Kunena Team | version: 5.0.1 | creationdate: 2016-08-20

Kunena version detailed: Kunena 5.0.1 | 2016-08-20 [ Binturong ]
| Kunena detailed configuration:

Warning: Spoiler!
| Kunena integration settings:
Warning: Spoiler!
| Joomla! detailed language files installed:
Warning: Spoiler!

Third-party components: AlphaUserPoints 2.0.4 | UddeIM 3.9

Third-party SEF components: None

Plugins: Search - Kunena Search 3.1.2

Modules: Kunena Latest 3.1.2.1 | Kunena Stats 3.1.2 | Kunena Login 3.1.2

Last edit: 3 years 10 months ago by greg1.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #4 by greg1
To bump this:

How can I fix this? Which file in Kunena is responsible for this behaviour?
I need to fix it ASAP, so I would like to "roll back", by using 5.0 files instead of the bugged 5.0.1 file, could someone tell me which ones to change?

I couldn't find what governs the modal windows submit button. It looks like a submit type input button, but behaves like kunenasave.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #5 by 810
could you check with protostar template, and with crypsis, if you have the same, else there is a issue on crypsisb3

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #6 by greg1
That modal window is the same on all templates, default, crypsis and crypsisb3, no difference in their code,
it's just an input type="submit" button.

The template file itself didn't change between 5.0 and 5.0.1.

Something that translates what the submit for that form means, is working wrong.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #7 by 810
some time ago an other user had the same issue, there was a broken 3rt party plugin.

try to find the topic, on the search. maybe it will help you. I will test later today

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #8 by greg1
Found the culprit!

/components/com_kunena/template/crypsisb3/assets/js/ markitup.set.js

The version I had after 5.0.1 looks like this:
// For picture settings
	$('#picture-modal-submit').click(function() {
		var modalpictureurl = $('#modal-picture-url').val();
		var modalpicturesize = $('#modal-picture-size').val();
		var modalpicturealt = $('#modal-picture-alt').val();
 
		var size = '';
		if ( modalpicturesize.length > 0 ) {
			size = 'size='+modalpicturesize;
		}
 
		var alt = '';
		if ( modalpicturealt.length > 0 ) {
			alt = 'alt='+modalpicturealt;
		}
 
		if ( modalpictureurl.length > 0 ) {
			$.markItUp(
				{ openWith:'[img '+size+' '+alt+']'+modalpictureurl,
				closeWith:'[/img]' }
			);
		return false;
		}
	});

And the one on the working site looks like this:
// For picture settings
	$('#picture-modal-submit').click(function() {
		var modalpictureurl = $('#modal-picture-url').val();
		var modalpicturesize = $('#modal-picture-size').val();
 
		var size = '';
		if ( modalpicturesize.length > 0 ) {
			size = 'size='+modalpicturesize;
		}
 
		if ( modalpictureurl.length > 0 ) {
			$.markItUp(
				{ openWith:'[img '+size+']'+modalpictureurl,
				closeWith:'[/img]' }
			);
		return false;
		}
	});

At submit, having an empty picture alt field (because the modal doesn't have an input field for it) throws an error, and fails.


After changing this part of the javascript, the modal works perfectly.
So case closed, but please check, how the incorrect code got into 5.0.1.

Thanks

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.143 seconds