Hello,
I'm using TinyPortal 2.0.1 and I have a 404 error on my forum, referring to "/admin/tp-files/tp-plugins/javascript/jquery.marquee.js".
What is tp-plugins folder? I don't have it...
How to solve?
Thank you
Can you explain when you see the error message?
I assume the error is related to the scrolling effect on the shoutbox.
I see that the /tp-files/tp-plugins/ folder was removed with TP2.0.0.
There is also something funny with that function: it is supposed to stop scrolling with a mouse-over: that does not work atm...
You can edit the file: source/TPShout.php
Find:
if($context['TPortal']['shoutbox_usescroll'] > 0) {
$context['html_headers'] .= '
<script type="text/javascript" src="tp-files/tp-plugins/javascript/jquery.marquee.js"></script>
<script type="text/javascript">
$j(document).ready(function(){
if ($j("marquee")) {
$j("marquee").marquee("tp_marquee").mouseover(function () {
$j(this).trigger("stop");
}).mouseout(function () {
$j(this).trigger("start");
});
});
}
</script>';
}
and change this to:
if($context['TPortal']['shoutbox_usescroll'] > 0) {
$context['html_headers'] .= '
<script type="text/javascript" src="Themes/default/scripts/tinyportal/jquery.marquee.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("marquee").marquee("tp_marquee").mouseover(function () {
$(this).trigger("stop");
}).mouseout(function () {
$(this).trigger("start");
});
});
</script>';
}
But I would like to know where you exactly see that error...
The error message will most likely be in the console log when you click on the networking tab.
I'd guess that's where it's being seen anyway.
That's what I suspected, but checking that I do not get this error, hence the question
Quote from: @rjen on August 04, 2021, 07:37:06 PM
Can you explain when you see the error message?
In the network tab of DevTools:
(https://i.ibb.co/mXmJcYM/Screenshot-at-2021-08-04-22-36-29.png)
QuoteI assume the error is related to the scrolling effect on the shoutbox.
I see that the /tp-files/tp-plugins/ folder was removed with TP2.0.0.
If it has been removed, why there is still reference to that file in TP 2.0.1?
QuoteThere is also something funny with that function: it is supposed to stop scrolling with a mouse-over: that does not work atm...
Maybe it is not working due a bug in the code:
(https://i.ibb.co/JW105bz/Screenshot-at-2021-08-04-22-46-11.png)
Shouldn't it be like the following?
$j(document).ready(function(){
if ($j("marquee")) {
$j("marquee").marquee("tp_marquee").mouseover(function () {
$j(this).trigger("stop");
}).mouseout(function () {
$j(this).trigger("start");
});
}
});
Quote from: smartmouse on August 04, 2021, 09:50:37 PM
In the network tab of DevTools:
Strange, I am not getting the 404..
QuoteIf it has been removed, why there is still reference to that file in TP 2.0.1?
That's a bug: the file was moved to another folder.
QuoteMaybe it is not working due a bug in the code:
Shouldn't it be like the following?
$j(document).ready(function(){
if ($j("marquee")) {
$j("marquee").marquee("tp_marquee").mouseover(function () {
$j(this).trigger("stop");
}).mouseout(function () {
$j(this).trigger("start");
});
}
});
Maybe, but you can just use the code I provided: that works as I have tested it.
That snippet comes from TP2.1.0, the code is cleaned up a bit...
Ok, solved, thank you!
I'm experiencing again the same error.
What could be wrong now?
What TP version are you on now?
First upgrade to 2.1.0....