TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 29, 2024, 08:54:46 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,173
  • Total Topics: 21,219
  • Online today: 74
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 51
  • Total: 51

TinyPortal 1.6.2: error with TPassimilate.php file in SMF errors log

Started by smartmouse, March 15, 2019, 09:28:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

smartmouse

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

@rjen

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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

smartmouse

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).

tino

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.

@rjen

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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

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?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

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.

tino

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.

@rjen

Running Latest TP on SMF2.1 at: www.fjr-club.nl

tino

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?

smartmouse

5.4 is the version of PHP on my hosting.

tino


@rjen

Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

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...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

smartmouse

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?

@rjen

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.
Running Latest TP on SMF2.1 at: www.fjr-club.nl