Hello, I had a look at SMF errors log and I see a lot of errors related to TPassimilate.php file:
"call_user_func() expects parameter 1 to be a valid callback, no array or string given" TPassimilate.php
What should I do to get rid of it?
Thank you in advance for your help.
SMF version: SMF ver. 2.0.15
TP version: TP ver. 1.6.2
Default Forum Language: Italian
Theme name and version: Ambassador
Mods installed:
Optimus
Hide SMF Version
Topic Descriptions
SMF 2.0.15 Update
Responsive Curve
Tapatalk SMF 2.0 Plugin
Stop Spammer
Ad Managment
Aeva ~ Auto-Embed Video & Audio
Disable 'last edit by...' for Administrators
Search Focus Dropdown
Pretty URLs
Custom Tab
cbi 1.0
Stop Forum Spam
Change All Subjects
Global Headers Footers
EU Cookie
Menu Order
Header Addon
Yet Another Global Announcements Mod
Remove Help From Menu
SMF Likes Plus
Can you post the complete error message, with the line numbers in the actual file as well as the link to where the error occurs?
(like in example below)
No way to tell from what you are posting where the error occurs...
Here is my error, it occurs for every topic.
https://mywebsite.com/index.php?pretty;board=board1;topic=topic-title
2: call_user_func() expects parameter 1 to be a valid callback, no array or string given
File: /my/path/www/Sources/TPassimilate.php
Line: 496
In the meanwhile I had to disable TinyPortal because I noticed that it prevent my site from loading the home page.
I mean that if I go to mysite.com I get 500 error, if I go to mysite.com/forum it works with no problems.
I get this problem and previous error when I installed 1.6.2 version. Before I had 1.4R version and atleast the home page worked (I do not know if I had errors in the log).
What version of php are you using?
It's this line of the code;
https://github.com/tinoest/TinyPortal/blob/master/Sources/TPassimilate.php#L496
Which was a change in the code I made for SMF 2.1, although as you are on 2.0 the first part of the if should be true.
Given that he is using 1.6.2 the PHP check upon install is already made, hence it should be 5.4 or higher.
Let's hear what exact version it is...
I am noticing the use of Pretty URL's and the resulting 'absense' of the actions in the calling url...
Quotehttps://mywebsite.com/index.php?pretty;board=board1;topic=topic-title
Could that be the cause?
Quote from: @rjen on March 15, 2019, 10:18:56 AM
I am noticing the use of Pretty URL's and the resulting 'absense' of the actions in the calling url...
Quotehttps://mywebsite.com/index.php?pretty;board=board1;topic=topic-title
Could that be the cause?
That would be the cause, let me install pretty url's here and see what breaks.
Quote from: tino on March 15, 2019, 10:30:25 AM
Quote from: @rjen on March 15, 2019, 10:18:56 AM
I am noticing the use of Pretty URL's and the resulting 'absense' of the actions in the calling url...
Quotehttps://mywebsite.com/index.php?pretty;board=board1;topic=topic-title
Could that be the cause?
That would be the cause, let me install pretty url's here and see what breaks.
I just installed PrettyURL's 2.1.4 and have no issues. So maybe not.
Perhaps the OP can provide the link to his forum?
Quote from: @rjen on March 15, 2019, 10:44:24 AM
Perhaps the OP can provide the link to his forum?
That might help, also in the index.php what is the value of $forum_version?
5.4 is the version of PHP on my hosting.
It's this mod;
Hide SMF Version
http://custom.simplemachines.org/mods/index.php?mod=1046
All our checks for SMF2.1 vs SMF2.0 would fail with this enabled.
You beat me to it, I just came to the same conclusion...
Confirmed. With that mod activated TP works fine for admins, but is breaks the site for all other users..
This is not something we can easily fix: $forum_version is the key that TinyPortal uses to switch between 2.0 and 2.1 logic. And it is in the TinyPortal code in many different locations, needed to make TP suitable for both 2.0 and 2.1 users.
At this time I would recommend to deactivate the Hide SMF Version mod.
TinyPortal will work fine then.
I personally doubt the usefulness of hiding the SMF version, but if you feel strongly about that, you cannot use TinyPortal...
Yes, this do the trick and solved both the problems!
Thank you very much guys for your support!
Quote from: @rjen on March 15, 2019, 11:58:34 AM
I personally doubt the usefulness of hiding the SMF version
Isn't a good practice for security reasons?
In the support thread for that MOD I find this quote from the mod author...
https://www.simplemachines.org/community/index.php?topic=214077.msg1367001#msg1367001
QuoteA lot is gone over in the "Rant" section in the readme.
You shouldn't need to hide your SMF version. In fact, it isn't really helpful at all.
A lot of people are under the impression that hiding the SMF version will protect them from hacking. It won't. Most attacks just try every possible vulnerability and see what sticks. Heck, often you will get attacks that are for software you don't even use. Of course, some people are so convinced wrongly they won't believe that and want to do it anyway.
The common method for hiding the version involves removing the version data. This also breaks the notices for SMF in the admin area. Basically, you won't get an alert if there is an important update. What this mod does is makes it so that the version is only hidden for non-admin users, which mean that update notices will still work properly.
So, do you need this mod? NO.
Is removing the version helpful in any way? Not really.
Why did I make the mod? To give those convinced they must hide the version a safe way to do so that doesn't break functionality.
Ahahah cool!
Thanks ;)