By Dayo on Friday, 03 February 2017
Posted in Technical Issues
Replies 16
Likes 0
Views 765
Votes 0
Something is messing up /components/com_easydiscuss/themes/wireframe/user/edit.js. I can't track down exactly what and where, but can see the evidence of this.

Specifically, it appears there is some code somewhere in the flow that is looking for the first occurrence of " '< /div >' " in the "render" method of "addressInput.selectize" in the edit.js file and changing this to " '< /script > < /div >' " for reasons that is not clear and which breaks "easydiscuss/profile/edit" pages as the script closing tag is not supposed to appear at that location.

Only way I have been able to avoid the problem is by hacking edit.js to avoid this change as shown in attached txt file.
Would be much better to find out what exactly is applying this unwanted "fix" to the code in the first place.
Thanks for sharing, but I would like to know how it messed up location view from the edit profile page?

Perhaps you download JING software to record a video or you can provide us with your site details so we can better have a check?
·
Saturday, 04 February 2017 01:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Sorry,

I just noticed that the txt file I uploaded included two versions of the hack I had to apply which is perhaps why you have missed the issue. I have fixed that now and reuploaded the file to the original post.

Imagine you have

< script>
JS Line 1
JS Line 2
< /script> <-- Premature script closing tag
JS Line 3
JS Line 4
< /script>

JS Line 3 & JS Line 4 will render as normal text.

I have temporarily restored my site to the original code to reproduce this as shown in the attached jpeg.

You will notice the JS script code rendered as html text in the bottom left side.
·
Saturday, 04 February 2017 01:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

it okay, thanks for took your time to explained again regarding this issue.

That was strange, I was unable to replicate this issue in my locally, may i know is it possible to provide us with your Joomla backend and FTP access so we can better have a check?

By right, it shouldn't suddenly populate this "< /script> <-- Premature script closing tag" from the script.

By the way, in the future you can just include your site's access once at http://stackideas.com/dashboard/site rather than needing to keep adding them in your replies
·
Saturday, 04 February 2017 12:50
·
0 Likes
·
0 Votes
·
0 Comments
·
If you can't reproduce this, then I suppose the conclusion is that another 3rd party plugin is what is doing this.
I will just live with my hack until I can find what which plugin it is.
·
Saturday, 04 February 2017 14:02
·
0 Likes
·
0 Votes
·
0 Comments
·
I am sorry that can't help much you here, we would love to check if you can provide us with your Joomla backend and FTP access.

Keep us update if you need further assistance in the future.
·
Saturday, 04 February 2017 14:25
·
0 Likes
·
0 Votes
·
0 Comments
·
This bug still exists and affects the following files:

/administrator/components/com_easydiscuss/themes/default/user/location.js
/components/com_easydiscuss/themes/wireframe/composer/forms/location.js
/components/com_easydiscuss/themes/wireframe/user/edit.js


Basically anything that includes "addressInput.selectize"

The answer so far is the hack I previously posted which is to change all instances of '</div>' to '</' + 'div' + '>' to defeat whatever is trying to change instances of '</div>' within "addressInput.selectize" to '</script></div>'.

No further assistance needed but would be nice to get to the bottom of this at some point.
·
Friday, 31 March 2017 22:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Dayo,

As mentioned by Arlex, since we cannot reproduce this, it's pretty difficult to really tell what went wrong but to get to the bottom of this, you could try unpublishing the plugins one by one and see if it fixes itself. Based on your input here, I am pretty sure a "System" plugin is performing such replacements.
·
Saturday, 01 April 2017 00:20
·
0 Likes
·
0 Votes
·
0 Comments
·
I understand the position taken.

One question though, I have set "Allow Location Services" to "No" in Components -> EasyBlog -> Settings -> General -> Location yet all the JS, including this, for Google Maps is still being rendered into my HTML output. Shouldn't switching this off simply mean EasyBlog skips putting all that JS into the output?

I get this issue on one side and see various JS errors in the console such as missing Google Maps Key etc because the call to Google Maps is still being made which should not be the case.

The issue I have might be related that that particular bug. IE., Location JS is being output although it has been switched off. Even if not, probably something that needs looking into in any case.
·
Saturday, 01 April 2017 14:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Dayo,

Could you please start a new thread (Since this thread is about EasyDiscuss) and let us know which page are you seeing this so that we can also test this locally?
·
Saturday, 01 April 2017 18:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Sorry, there was a mix up in my post. The location issue is with EasyDiscuss and the path I should have posted was: "Components -> EasyDiscuss -> Settings -> Location Service".

Both of "Enable Location Services For Questions" and "Enable Location Services For Replies" are set to "off" but all the associated JS for Google Maps etc is still output as part of the HTML. The original issue I raised only occurs because this JS is there and would go away if these were not output as one would expect since the functionality has been disabled.

I get the original issue on one side and also see various JS errors in the console such as missing Google Maps API Key etc because the call to Google Maps is still being made which should not be the case when location services is off.
·
Saturday, 01 April 2017 23:12
·
0 Likes
·
0 Votes
·
0 Comments
·
I see. I get what you mean now. Download the attached file and upload it into /components/com_easydiscuss/themes/wireframe/composer/forms/
·
Saturday, 01 April 2017 23:25
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post