QuickReply Reloaded

Wrong author in selective quotatation - QuickReply Reloaded

Wrong author in selective quotatation

by lays » Mon Sep 16, 2019 9:10 am

This is the scenario:

1. User A writes a post
2. User B quotes post from user A.
3. A is marked as quotation author (and this is correct)
4. User C selects part of quotation posted by user B and submit post
5. B is marked as quotation author (which is incorrect - it should be user A)

Is there any chance to change this behavior?

EDIT:
There is another problem with qoutation author (it is connented with iPhone i suppose).
Sometimes if user write one post (using AJAX) and ten another with qotation - the qotation in second post has wrong author too.
lays
Registered User
Posts: 7
Joined: Fri Mar 29, 2019 7:32 pm
Contact:

Re: Wrong author in selective quotatation

by scheccia » Sun Sep 29, 2019 10:56 am

this bug is only in mobile, on desktop work all fine.
can fix it
scheccia
Registered User
Posts: 46
Joined: Fri Feb 10, 2017 8:16 am
Contact:

Re: Wrong author in selective quotatation

by koraldon » Sun Sep 29, 2019 4:11 pm

I also have the same bug mainly on mobile.
koraldon
Registered User
Posts: 512
Joined: Sat Jun 30, 2007 12:42 pm
Contact:

Re: Wrong author in selective quotatation

by scheccia » Wed Oct 02, 2019 7:21 am

i fix it (not beautifully but it works).
edit file styles/all/template/quickreply_plugins.js
after:

Code: Select all

/**
		 * Inserts a quote from the specified post to quick reply textarea.
		 */
		self._insertQuote = function() {
		
insert:

Code: Select all

var selection = window.getSelection(); 
var node = selection.anchorNode;
while (node.nodeName != 'BODY'){
 			node = node.parentNode;
				if (node.id.indexOf('post_content')>=0){
				var id = parseFloat(node.id.replace('post_content',''));
				self._postID=id;
				}
 			}

scheccia
Registered User
Posts: 46
Joined: Fri Feb 10, 2017 8:16 am
Contact:

Re: Wrong author in selective quotatation

by lays » Mon Oct 07, 2019 1:10 pm

Thanks for all answers! I will try to edit this file scheccia and test it.
lays
Registered User
Posts: 7
Joined: Fri Mar 29, 2019 7:32 pm
Contact:

Re: Wrong author in selective quotatation

by lays » Wed Oct 09, 2019 3:57 pm

It is causing en error on Chrome when i try to use full post quote (without selection):

Code: Select all

Uncaught TypeError: Cannot read property 'nodeName' of null
lays
Registered User
Posts: 7
Joined: Fri Mar 29, 2019 7:32 pm
Contact:

Re: Wrong author in selective quotatation

by Татьяна5 » Wed Oct 09, 2019 7:04 pm

User avatar
Татьяна5
Registered User
Posts: 142
Joined: Wed Feb 13, 2013 5:30 pm
Name: Tatiana
Contact:

Re: Wrong author in selective quotatation

by lays » Wed Oct 16, 2019 4:56 pm

I am using 2.0.0-beta4 version - should I upgrade?
lays
Registered User
Posts: 7
Joined: Fri Mar 29, 2019 7:32 pm
Contact:

Re: Wrong author in selective quotatation

by Татьяна5 » Wed Oct 16, 2019 5:15 pm

Yes
User avatar
Татьяна5
Registered User
Posts: 142
Joined: Wed Feb 13, 2013 5:30 pm
Name: Tatiana
Contact: