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

Recent

Welcome to TinyPortal. Please login or sign up.

December 10, 2024, 01:06:17 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,443
  • Total Topics: 21,252
  • Online today: 134
  • Online ever: 6,457 (November 30, 2024, 02:40:09 PM)
Users Online
  • Users: 1
  • Guests: 94
  • Total: 95
  • tino

Blöcke werden angezeigt obwohl deaktiviert

Started by rrolle, November 12, 2024, 05:26:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rrolle

Seit dem Update auf TP 3.0.1 werden Blöcke auf Unterseiten angezeigt, obwohl in den Einstellungen nur "Titelbild" aktiviert ist.
Cache habe ich gelöscht.

--------------------
Since the update to TP 3.0.1, blocks are displayed on subpages, even though only "cover image" is activated in the settings.
I have deleted the cache.

@rjen

What are subpages? Any link to a page where we can see it?

What do you mean with 'cover image' what setting is that?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

rrolle

This is a "subpage":
https://www.roberge.de/tour.php?id=1476

And the "cover image" setting see attachment "unbenannt.png"

"Unbenannt2.png" is the block that should only be displayed on the front page.

@rjen

What mod do you use to make subpages? Those are not TinyPortal pages!
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Just checked your site, and the url for that page is not what  TinyPortal expects. Most certainly because of the custom way you are creating those pages.

You say that it worked as you wanted in 3.0.0?
Was that specific to the front page setting for blocks? Or also other settings?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

rrolle

Ja, in der Version 3.0.0 hat es problemlos funktioniert.
Gibt es denn eine Lösung, oder soll ich menien Programmierer beauftragen, die "Unterseite" tour.php anzusehen?

@rjen

I have no clue. This is a non standard setup.

Maybe one of the updates in 3.0.1 had this side effect. I can check , but no guarantees and it will take some time
Running Latest TP on SMF2.1 at: www.fjr-club.nl

rrolle

QuoteIch kann es überprüfen, aber ich kann es nicht garantieren und es wird einige Zeit dauern.

Das wäre gut!

@rjen

Did a quick check and I see why the block is showing: this is because your 'subpage' is basically considered a Frontpage

// frontpage
if (!isset($_GET['action']) && !isset($_GET['board']) && !isset($_GET['topic']) && !isset($_GET['page']) && !isset($_GET['cat'])) {
    $permissions[] = 'frontpage';
}

Your URL does not meet any of the checks: https://www.roberge.de/tour.php?id=1476

This has not changed from 3.0.0 to 3.0.1. so I cannot explain why it is different from what you are used to.

What you can try is updating These lines in Tinyportal\Block.php, to this. This may help in your specific case, but I cannot test it...

// frontpage
if (!isset($_GET['action']) && !isset($_GET['board']) && !isset($_GET['topic']) && !isset($_GET['page']) && !isset($_GET['cat'] && !isset($_GET['id'])) {
    $permissions[] = 'frontpage';
}
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Arminus

Thanks for the help, just applied that patch, works ok for any "subpage" which gets loaded with an id parameter.

We do however also have other subpages which don't need any parameter and then the patch obviously doesn't work. Workaround on top of the patch would be to load those with a dummy id=0 param, but well...

Those pages are not mods by the way, but standalone php pages which we embed into TinyPortal - like https://www.roberge.de/webcamkarte.php - as mentioned, the effect did not exist until we upgraded to 3.0.1