Thread Starter
snurk
(@snurk)
Okay.. this post doesn’t make since unless it is seen, please see:
Please see
https://www.fragadietisten.se/aktuellt/vad-ar-din-fraga
Under “MEST LΓST” is the toplist. There the html-code is displayed instead of the dash. Strange right?
It seems “coca-cola” uses a short dash, whereas the other is a long dash. the Coca-cola is loaded as a dash in html, whereas the log dash is loaded with html code for a long dash.
Ideas how to solve? π
-
This reply was modified 6 years, 3 months ago by
snurk.
-
This reply was modified 6 years, 3 months ago by
snurk.
Hi @snurk,
The issue comes from the type of “-” code you have used in that post title.
What I suggest as a quick fix in this case is:
1. Update that post title and replace the “-” with a typed “-” symbol, from your keyboard. There is a very high chance that the character used now was generated by a rich text editor such as MS Word or similar
2. Clear the cache of that post, if you have it enabled
3. Fetch again the data from Toplytics, by going to settings
4. Refresh the page and let us know how it goes
Let us know if it works this way!
Pedro/Presslabs Support Team
P.S. Additional question: how do you see it in your Google Analytics? Is it displayed properly?
P.P.S I have opened up an issue for us to investigate further: https://github.com/presslabs/toplytics/issues/143
Thread Starter
snurk
(@snurk)
It seems not to change from this, I can of course enter phpmyadmin and see how the two titles may differ in MySQL.. but I gotta be cautious not to mess things up.. π
No, for sure you don’t have to do any changes in the DB, because the actual post title has changed already. Please allow us more time to get this investigated, as it shouldn’t happen, even if you were using the so-called “long” dash.
Thanks for your patience.
Pedro/Presslabs Support Team
Hello @snurk,
I believe you’re using the default template file for your top? If not you can simply edit your custom version as follows.
If you’re using the default template you need copy the widget.blade.php file, in the same directory and name it custom.blade.php.
Now, edit this custom.blade.php file and replace all “{{” occurences with “{!!” as well as “}}” with “!!}” and let me know if this works.
This is the file I’m talking about: https://github.com/presslabs/toplytics/blob/master/src/resources/views/frontend/widget.blade.php
Best regards,
~Cristian – Presslabs Support Team
Thread Starter
snurk
(@snurk)
Hello!
Thanks again for response! When I try this change in folder:
wp-content/plugins/toplytics/resources/views/frontend/
Copy
widget.blade.php
Into
custom.blade.php
And replace all occurences, the toplist disappears. Please see:
https://fragadietisten.se/FD_toplytics.jpg
This is the exact code of custom.blade.php:
https://fragadietisten.se/custom.blade.txt
Looking at HTML-source of the site, it ends after trying to initialize the toplist:
“><h2 class=”title”>Mest lΓ€st</h2><!– WP Fastest Cache file was created in 0.59374904632568 seconds, on 15-02-19 9:20:57 –>”
Any idea what might be wrong? π
best regards,
snurk
Thread Starter
snurk
(@snurk)
My errorlog is full of these lines:
[15-Feb-2019 08:29:09 UTC] PHP Fatal error: Method Illuminate\View\View::__toString() must not throw an exception, caught ErrorException: syntax error, unexpected ‘!’ (View: /public_html/snurkify/wp-content/plugins/toplytics/resources/views/frontend/custom.blade.php) in /public_html/snurkify/wp-content/plugins/toplytics/components/Window.php on line 0
Same error repeats several times per minute.
-
This reply was modified 6 years, 3 months ago by
snurk.
Hello @snurk,
You are correct. The comment block on top of that file should not be changed. They should stay as {{--
and --}}
. You can even remove that comment block on top of the file entirely.
Please try that and let us know if that fixed the problem for you.
Best regards,
~Cristian
-
This reply was modified 6 years, 3 months ago by
Presslabs.
Thread Starter
snurk
(@snurk)
And with that change, it works! π π π
Thanks as well for your patience in getting this resolved!
Best regards,
Pedro/Presslabs Support Team