Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
Li3D Posted August 29 Posted August 29 Hi, As i'am french, the "load more activity" button is translated with "activité que j'ai créé". Just to show the problem, I switched to english and added "J'AI" in the string : So far so good, but if I press the load more activity button : all the apostrophe (') are replaced by the HTML code : It does this for all the elements in this menu that have "'a" in the string. It's OK with a space after the apostrophe but that's not the correct way to write it 🙂
Marc Posted August 29 Posted August 29 Please ensure you are on the latest release of the platform, with all 3rd party items disabled. I have been unable to replicate this unfortunately. Li3D 1
Li3D Posted August 29 Author Posted August 29 12 minutes ago, Marc said: I have been unable to replicate this unfortunately. Indeed, it comes from the child theme I created from the default theme to apply some modifications... I'll look for which one could cause the problem but if you have a lead on the file that calls the button function I'm all ears.
Li3D Posted August 29 Author Posted August 29 I "reverted" every modified files but they still appear "modified" : Anyway, if I search for "<!-- Li3D -->" which I use to find my modifications there are no more results. I cleared the cache and applied the lastest patch without success. Maybe a JS script from the parent theme not updated somewhere ?
Li3D Posted August 29 Author Posted August 29 (edited) I created a new theme from the 4.7.X sources and I finally have the same problem. I also disabled all plugins and all applications and I still have the problem even after cleaning the cache 🤔 I suspect a problem with root_library.js or front_front_streams.js. Edited August 29 by Li3D
Marc Posted August 29 Posted August 29 Do you have any caching running on your server at all? Im not able to replicate this in any way.
Li3D Posted August 29 Author Posted August 29 I tried in private browsing without cache and it's the same. Anyway, it's a "bug" reported by users, I'm not the only one to have it. In the console I only see front_front_streams.js called when I hit the button. It only happens with "J'AI", not "J' AI".
Marc Posted August 29 Posted August 29 If there is an issue on the server, your users will of course also see this. When I refer to caching, I mean caching on your server itself. Please check with your hosting company if you are unsure on this
Li3D Posted August 29 Author Posted August 29 No caching on the hoster side 😞 JS file loaded is the same I can open via FTP. Can you confirm me that the script loaded when I press load more is front_front_streams.js ?
Marc Posted August 29 Posted August 29 3 minutes ago, Li3D said: No caching on the hoster side 😞 JS file loaded is the same I can open via FTP. Can you confirm me that the script loaded when I press load more is front_front_streams.js ? I have tagged our developers to see if someone can confirm that for you. Im not a developer myself on the platform Li3D 1
Li3D Posted August 29 Author Posted August 29 I took a closer look at the script in question: self._updateStreamUI = function(response) { // Updating stream UI... this.scope.find('[data-role="streamBlurb"]').text(response.blurb.replace(/'/g, "'")); this.scope.find('[data-role="streamTitle"]').html(response.title); // More UI update logic... } I have a strong feeling that it comes from there 🤔
Li3D Posted August 29 Author Posted August 29 I think there might be an issue with the XSS protection. If I translate like that : The letter A HTML code "a" is correctly rendered (A displayed). As soon as I press the load more button, the A code is no more rendered and I can read the code in front :
Marc Posted August 29 Posted August 29 Ah, have you tried translating them from the stream itself in System->Content Discovery->Streams? I believe thats what the difference is between what Im doing here, and what you are attempting on your end
Li3D Posted August 29 Author Posted August 29 Translation done in back office as it's a default stream. Just tested with a custom stream with "J'AI" in title and same problem.
Nathan Explosion Posted August 29 Posted August 29 Reproducible as follows Create a new custom stream called Custom stream J'AI Open that stream View the menu - all good (see 'Before') Scroll to the bottom - click the "Load more activity" button Scroll up and view the menu - there's the reported issue (see 'After') Before: After: Li3D 1
Li3D Posted August 29 Author Posted August 29 So it's not only on my installation, thank you @Nathan Explosion 👌
Marc Posted August 29 Posted August 29 I see the difference there. Thank you Nathan, that helped Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release. Li3D 1
Recommended Posts