News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

TinyPortal

Started by lurkalot, February 12, 2005, 04:43:00 AM

Previous topic - Next topic

tinoest

Ok, it's a issue with the other mod not TinyPortal.

Just found the line causing the problem. Please ask the other Mod Author to check the boardHooks function.

RustyBarnacle

Quote from: @rjen on February 07, 2023, 06:59:54 AM
Quote from: jsx on February 07, 2023, 04:27:14 AMThe first page in this topic does not load fully. After entering the TinyPortal modification, the following error is displayed:

This page is not working
The custom.simplemachines.org server cannot handle this request right now.

HTTP ERROR 500

This is NOT a TinyPortal issue

Is it possible to point a person in the right direction please?  I've spent about an hour going through searches and can't find how to fix this.

Arantor

Wait, you're trying to fix an issue with custom.simplemachines.org (the customisation site here)? or your own site?

If it is your own site, what is in the error log? (the *server* error log)
Holder of controversial views, all of which my own.

RustyBarnacle

It was my own site.  I fixed it by going to PHP 7.4.  Originally was PHP 7.2.

@rjen

The report stated that that the first page HERE was not loading. This site does not run TinyPortal, so therefore the conclusion.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

Okay, now I get this error:

When go into SMF's permissions.

 DeadMan
 /index.php?action=admin;area=permissions;
 /Sources/ManagePermissions.php (Line 1681)

Type of error: Undefined
Error message
2: Undefined array key "permissionname_tp_can_search"
I tell it how I see it... Don't like it? Hit Alt+F4!

tinoest

Quote from: DeadMan... on March 19, 2023, 08:41:02 PMOkay, now I get this error:

When go into SMF's permissions.

 DeadMan
 /index.php?action=admin;area=permissions;
 /Sources/ManagePermissions.php (Line 1681)

Type of error: Undefined
Error message
2: Undefined array key "permissionname_tp_can_search"

https://github.com/search?q=repo%3ATinyportal%2FTinyPortal%20permissionname_tp_can_search&type=code

Can you checked you have the latest language file.

DeadMan...

Quote from: tinoest on March 20, 2023, 06:10:59 AMhttps://github.com/search?q=repo%3ATinyportal%2FTinyPortal%20permissionname_tp_can_search&type=code

Can you checked you have the latest language file.

I had downloaded the latest version from the mod site. I edited the file and added the part you showed in the link and no more errors.

You may want to check the current version since it appears to not have the updated file.
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Quote from: DeadMan... on March 20, 2023, 07:24:50 AMI had downloaded the latest version from the mod site. I edited the file and added the part you showed in the link and no more errors.

You may want to check the current version since it appears to not have the updated file.

Just downloaded the package from the site here and checked the file... the string is in there...
You cannot view this attachment.
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

@@rjen
That's strange. I know I downloaded it from the mod site.
Will look through the file when get back to my PC.
I tell it how I see it... Don't like it? Hit Alt+F4!

DeadMan...

Trying to place a block into a topic.
Is this possible?
I tried in the "Custom actions (format: action1,action2) - will be added to actions list above. To remove, simply uncheck" section to place: topic=2.0
This did not work.

What trying to accomplish, is to have a block showing that will have images available for people to copy/paste to use in that topic.
I tell it how I see it... Don't like it? Hit Alt+F4!

DeadMan...

Quoteindex.php?action=post;msg=1264;topic=805.0
Sources/Subs.php (Line 1809)

Type of error: Undefined
Error message
2: Undefined array key "href"

Happens whenever go to edit a post.
The post does have attachments.
So, when look at that area, I found this:

// No image. Show a link.
else
$returnContext .= '<a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a>';

Per: Undefined array key "href"

It appears that it only happens on forums when have TP enabled.
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Are you using the mod Simple Audio Video embedder?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

Quote from: @rjen on April 08, 2023, 12:51:18 AMAre you using the mod Simple Audio Video embedder?

No, I am not.
On the test forum, only mods that were installed were TP and fixDbPackages advance fix for SMF2.1.3.
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Interesting, I was having the same error, and that went away when I removed SAVE

Not sure how this would be related to TinyPortal tbh: since it is all hooks and it does not do anything with attachments in posts I cannot really understand how this error in this standard code section would be caused by TinyPortal.

But I believe you when you say it, just no clue....
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Bugo

This has nothing to do with TinyPortal, but is triggered during the editing of a post with images inserted using the attach tag in the text, when on the page calls ssi_recentTopics.

Possible fix, in Post.php find

        
// Load up 'em attachments!
        
foreach ($temp as $attachment)
        {
            
$context['current_attachments'][$attachment['id_attach']] = array(
                
'name' => $smcFunc['htmlspecialchars']($attachment['filename']),
                
'size' => $attachment['filesize'],
                
'attachID' => $attachment['id_attach'],
                
'approved' => $attachment['attachment_approved'],
                
'mime_type' => $attachment['mime_type'],
                
'thumb' => $attachment['id_thumb'],
            );
        }

and replace with

        
// Load up 'em attachments!
        
foreach ($temp as $attachment)
        {
            
$context['current_attachments'][$attachment['id_attach']] = array(
                
'name' => $smcFunc['htmlspecialchars']($attachment['filename']),
                
'size' => $attachment['filesize'],
                
'attachID' => $attachment['id_attach'],
                
'href' => $scripturl '?action=dlattach;attach=' $attachment['id_attach'],
                
'approved' => $attachment['attachment_approved'],
                
'mime_type' => $attachment['mime_type'],
                
'thumb' => $attachment['id_thumb'],
            );
        }


DeadMan...

Quote from: Bugo on April 08, 2023, 09:34:44 AMThis has nothing to do with TinyPortal

The fix worked, by why is it only had the issue when had TP installed?
I had done the same post, same image inserted on the test forum and edited it with no error before installing TP there. Once installed, it started the same error.

Either way, thank you for finding the fix, my friend.  :)
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Probably because of this

when on the page calls ssi_recentTopics.
Which is something TinyPortal uses for the recent topics block
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Bugo

Light Portal has the same problem :)

DeadMan...

So it was just luck that I was able to figure it out and post in the right spot to get a fix, then...
Typical. LOL
I tell it how I see it... Don't like it? Hit Alt+F4!

Advertisement: