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

DeadMan...

SMF 2.1.3
TinyPortal 2.3.0
fixDbPackages advance fix for SMF2.1.3   1.0



2 Errors:

Themes/default/TPsubs.template.php (Line 436)
Type of error: Undefined
8: Undefined index: useavatar


Sources/TPortal.php (Line 1891)
Type of error: Undefined
8: Undefined index: var1



Narrowed down the issue to the default Online block.
Tried the other online block available, and no longer get the errors.
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

No way to analyze without the full error, including the action that the user is performing.

Please provide that info.

Also is it a new install or did you upgrade.

If you upgraded: what custom blocks do you have?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

It was any page load that produced the error.
That's how narrowed it down to the one block.

This was on full install on TP, and no custom blocks at the time.
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Please post the action that is in the log. This error is not common on all installs, so there is something specific to yours


What block?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

Quote from: DeadMan... on February 25, 2023, 12:52:47 PMNarrowed down the issue to the default Online block.
Tried the other online block available, and no longer get the errors.

Actions:

index.php?action=forum
index.php?action=admin;area=logs;sa=errorlog;desc
index.php?action=admin
index.php?action=moderate
index.php?action=tpadmin

Like I said:

Quote from: DeadMan... on February 25, 2023, 01:01:46 PMIt was any page load that produced the error.
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

Unless use default Online block, yes.
I will try to make a test site later, and see if can reproduce on fresh installs of all 3.
I tell it how I see it... Don't like it? Hit Alt+F4!

lurkalot

Quote from: DeadMan... on February 25, 2023, 01:40:51 PMUnless use default Online block, yes.
I will try to make a test site later, and see if can reproduce on fresh installs of all 3.

Very strange, I haven't managed to make it blurt any errors, on various upgraded versions as well a new install Of SMF 2.1.3

DeadMan...

Quote from: lurkalot on February 25, 2023, 02:22:26 PMVery strange, I haven't managed to make it blurt any errors, on various upgraded versions as well a new install Of SMF 2.1.3

I can tell that it does have something to do with avatars in the default Online block, and recently discovered same errors when tried the default Recent Topics block, as well.

Could have something to do with the fact that had TP 2.2.2 installed first, then uninstalled it to install 2.3.0.

Using the secondary blocks for them works fine, and IMHO, looks better, anyways. :)
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

I asked if you did a clean install. So you did not: you actually upgraded from 2.2.2

Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

I had 2.2.2 installed, then uninstalled it.
I did not realize before that it was outdated, or I'd have installed 2.3.0 first.
When uninstalled, I figured it would be a fresh install when installed 2.3.0.
Did not realize the database info was not deleted, until afterwards.
I tell it how I see it... Don't like it? Hit Alt+F4!

DeadMan...

I seem to have found an issue that never expected.
When do HTML block, and have a textarea in the contents, it'll cut off at the closing of the textarea.
When it does that, it goes and actually closes the textarea of the block.

Before save:
You cannot view this attachment.

After save:
You cannot view this attachment.

Notice how it got cut off?
Look at bottom, just under the textarea for the block, the image that should have been aftter the closing textarea is showing where it should not be.

I have no idea how to do the textarea so it won't clash with the block's. 
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Confirmed. Seems to be a bug.

Workaround: do not use texarea elements in a html block, but use a  div instead...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

That may not be possible for this code.
It would get parsed and not show the code for people to get.
However, another workaround is, once saved, it does actually work, even though it shows that way in the block editor. You'd have to re-paste the code every time want to change it, but it's doable.

Just figured to let you know about the issue, so maybe can be fixed. :)
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Quote from: DeadMan... on February 26, 2023, 05:15:41 AMThat may not be possible for this code.
It would get parsed and not show the code for people to get.
However, another workaround is, once saved, it does actually work, even though it shows that way in the block editor. You'd have to re-paste the code every time want to change it, but it's doable.

Just figured to let you know about the issue, so maybe can be fixed. :)

If you want the code to be parsed you may better put it into a php block...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

#3415
What it is, is a way for people to copy an affiliates code.
I need it where they can see the HTML code to copy.
I tried using <code> and <pre>  tags, but no-go on them working.
It still gets parsed. Need something like a bbc code block for HTML:

<a href="https://www.deadman.cc.nf" target="_blank" <img src="https://www.deadman.cc.nf/images/DK_Mini.png" alt="DeadMan Knows - Rants, Raves & Reviews" title="DeadMan Knows - Rants, Raves & Reviews" border="0" width="88" height="31" /> </a>
Not too sure what else could try.



On another note, may have found another bug:
Posts show BBC code block fine, but if have HTML in the BBC code block, the > gets removed when viewing the post on the TP frontpage:

Post:
You cannot view this attachment.

Frontpage:
You cannot view this attachment. 
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

Could you post the full code of your post in a code block here? So I can use it for some tests?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Quote from: DeadMan... on February 26, 2023, 05:15:41 AMThat may not be possible for this code.
It would get parsed and not show the code for people to get.
However, another workaround is, once saved, it does actually work, even though it shows that way in the block editor. You'd have to re-paste the code every time want to change it, but it's doable.

You may better work around this by making it a BBC block: put the code in the [code ] tags and you do not need the < textarea> at all..

<a href="https://www.deadman.cc.nf" target="_blank"><img src="https://www.deadman.cc.nf/images/DK_Mini.png" alt="DeadMan Knows - Rants, Raves & Reviews" title="DeadMan Knows - Rants, Raves & Reviews" border="0" width="88" height="31" /></a>
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

DeadMan...

Here's the part that's got the issue in the HTML (and php) block settings code block.

<div align="center"><table width="95%">
  <tr><td colspan="2" align="center"><strong>If you would like to affiliate with us, please use the code below, to add us to your site.<br />
You can reply to the <a href="https://www.deadman.cc.nf/index.php?topic=7.0">Affiliates Requests thread</a>, to send us your code. Images need to be 88x31px.</strong></td></tr><tr>
      <td align="right" valign="middle"><textarea name="affiliates" readonly="true" onclick="this.select()" style="width:100%; height: 31px; font-size: 10pt;"><a href="https://www.deadman.cc.nf" target="_blank"><img src="https://www.deadman.cc.nf/images/DK_Mini.png" alt="DeadMan Knows - Rants, Raves & Reviews" title="DeadMan Knows - Rants, Raves & Reviews" border="0" width="88" height="31" /></a></textarea></td><td width="100" align="right" valign="middle"><img src="https://www.deadman.cc.nf/images/DK_Mini.png" alt="DeadMan Knows - Rants, Raves & Reviews" title="DeadMan Knows - Rants, Raves & Reviews" border="0" width="88" height="31" />
</td>
    </tr>
</table></div>

Here's the one that gets the > cut off on board news frontpage:

<a href="https://www.deadman.cc.nf" target="_blank" <img src="https://www.deadman.cc.nf/images/DK_Mini.png" alt="DeadMan Knows - Rants, Raves & Reviews" title="DeadMan Knows - Rants, Raves & Reviews" border="0" width="88" height="31" /> </a>

I've found a fix, for theme using, by placing it into the template file, in the footer.
However, it would still be nice to work it via the blocks.
With having a lot of affiliates that have the HTML codes, it would be a rather pain to remake them all for a BBC block.
I tell it how I see it... Don't like it? Hit Alt+F4!

@rjen

I would realy recommend not using table layouts: that is usually a recipe for problems these days.

Change your block to BBC and try this for bbc code...
[center][b]Affiliates Requests[/b]
If you would like to affiliate with us, please use the code below, to add us to your site.
You can reply to the <a href="https://www.deadman.cc.nf/index.php?topic=7.0"> Affiliates Requests thread</a>, to send us your code. Images need to be 88x31px.
[/center]
[code*]<a href="https://www.deadman.cc.nf" target="_blank"><img src="https://www.deadman.cc.nf/images/DK_Mini.png" alt="DeadMan Knows - Rants, Raves & Reviews" title="DeadMan Knows - Rants, Raves & Reviews" border="0" width="88" height="31" /></a>[/code*]
[img width=88 height=31]https://www.deadman.cc.nf/images/DK_Mini.png[/img]

just change the code* to code before you use it
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Advertisement: