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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 468
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 80
  • Total: 80

2 errors in error log

Started by darkangel, July 05, 2011, 04:15:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkangel

well things go right along then.....kaplooey :P

these are a couple of error messages and what the admin was doing I guess. He actually was testing a few links for me from the Enterprise theme by Blocweb...which I notified him about too

I have been through the entire forum and I can not get the errors as yet but he did:


http://thefantasiesattic.net/attic/index.php?action=tpadmin;blockedit=13;sesc

2: htmlspecialchars_decode() expects at most 2 parameters, 3 given
File: /home/thefanta/public_html/attic/Themes/default/TPortalAdmin.template.php
Line: 2644
   

http://thefantasiesattic.net/attic/index.php?action=tpadmin;blockedit=13;sesc

2: Invalid argument supplied for foreach()
File: /home/thefanta/public_html/attic/Themes/default/TPsubs.template.php
Line: 2033
not sure what to do but will attach the files for you to look at if you please.

darkangel

update---- finally figured out what causes those errors to show up. tonight/day what ever it is now...I was going through our blocks with images (toppers for the categories) to remove the unwantee characters that appear in place of some special characters like the copyright symbol.

went into error log and oops there they were.

so it is when editing the blocks...whether we actually do anything at all or not...I tested by just going to a block, click edit tool icon then hit save...there was the error

seems just clicking the link for the Panels and Blocks in admin or the edit button gives this:

2: Invalid argument supplied for foreach()
File: /home/xxxxx/public_html/xxxx/Themes/default/TPsubs.template.php
Line: 2033

IchBin

For the first error you reported, if you goto the file and line number can you post the code that you have for it please? I don't see the error in my code when looking at it.

Don't know about the second error. I'll have to look. Assuming your running SMF1 and TP1 RC2?

darkangel

yes tp=rc2 with 1.1.14 smf, sorry about that forgot to plop that in


lines 2638 to2661
// edit single block
function template_blockedit()
{
   global $context, $settings, $options, $txt, $scripturl, $modSettings, $boarddir, $boardurl, $language;


   $newtitle = htmlspecialchars_decode(TPgetlangOption($context['TPortal']['blockedit']['lang'], $context['user']['language']), ENT_QUOTES, $context['character_set']);
      if(empty($newtitle))
         $newtitle = $context['TPortal']['blockedit']['title'];
      
   echo '
   <form accept-charset="', $context['character_set'], '" name="tpadmin_news" enctype="multipart/form-data" action="' . $scripturl . '?action=tpadmin" method="post" style="margin: 0px;">
      <input type="hidden" name="sc" value="', $context['session_id'], '" />
      <input name="tpadmin_form" type="hidden" value="blockedit">
      <input name="tpadmin_form_id" type="hidden" value="' . $context['TPortal']['blockedit']['id'] . '">
      <table class="admintable">
         <caption class="catbg">' . $txt['tp-editblock'] . '</caption>
         <tbody>
            <tr>
               <td style="padding: 0; border: none;">
                  <table class="formtable" id="editblock">
                     <caption class="titlebg">
                        <a href="' , $scripturl, '?action=tpadmin;sa=blocks">' , $txt['tp-gobackallblocks'] , '</a>
                     </caption>


seems they both have to do with editing the blocks -- even with no edit, just click the E or the panels and blocks to go see them will set it off...lol

as for the other error it talks about subtabs but I don'thave tabbed themes at all, course I may be misunderstanding that bit since I have only just begun to figure some things out in php...lol

IchBin

Change this line:
$newtitle = htmlspecialchars_decode(TPgetlangOption($context['TPortal']['blockedit']['lang'], $context['user']['language']), ENT_QUOTES, $context['character_set']);

To this:
$newtitle = htmlspecialchars_decode(TPgetlangOption($context['TPortal']['blockedit']['lang'], $context['user']['language']), ENT_QUOTES);

darkangel

 :-* :-* :-*

that took care of error #1 and now left with the second one:

lines 2033 to 2054

function template_subtab_above()
{
   global $context, $txt, $settings;

   if(sizeof($context['TPortal'])>1)
   {
      // The admin tabs.
      echo '
         <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
            <tr>
               <td class="mirrortab_first">&nbsp;</td>';

      // Print out all the items in this tab.
      foreach ($context['TPortal']['subtabs']  as $tab)
      {
         if(!isset($tab['active']))
            $tab['active'] = $tab['is_selected'];

         if ($tab['active'])
         {
            echo '
               <td class="mirrortab_active_first">&nbsp;</td>
               <td valign="top" class="mirrortab_active_back">
                  <a href="', $tab['href'], '">', $tab['title'], '</a>
               </td>
               <td class="mirrortab_active_last">&nbsp;</td>';
         }
         else
            echo '
               <td valign="top" class="mirrortab_back">
                  <a href="', $tab['href'], '">', $tab['title'], '</a>
               </td>';
      }

      // the end of tabs

IchBin

You only get that last error when editing blocks?

darkangel

same as the other one---click panels and blocks not even touching a block, or click the e and still no touching the block to edit

IchBin

I can't reproduce the same error. Can you tell me what subtabs you see when you are on that page? By subtabs, I mean the tabs that are just above all the blocks in the middle.

darkangel

ok, hope this is what you mean. took a screenshot to show you the spot where I think there is supposed to be a tab.

hope you can see it

This website is proudly hosted on Crocweb Cloud Website Hosting.