TinyPortal

Development => Support => Topic started by: Skhilled on December 12, 2010, 07:20:52 PM

Title: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on December 12, 2010, 07:20:52 PM

Link to my site: http://www.skhilled.com/smf
SMF version: SMF 2RC4
TP version: TP 1.0 RC1 for SMF 2RC4
Default Forum Language: English
Theme name and version: Core
Browser Name and Version: Firefox 3.6.13
Mods installed: None when I found these errors but installed a few afterwards
Related Error messages:
Quotehttp://www.skhilled.com/smf/index.php? (http://www.skhilled.com/smf/index.php?)8: Undefined index:  realName
File: /home/skhille1/public_html/smf/Sources/TPortal.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1NvdXJjZXMvVFBvcnRhbC5waHA=;line=1843)
Line: 1843

http://www.skhilled.com/smf/index.php?http://www.skhilled.com/smf/ (http://www.skhilled.com/smf/index.php?http://www.skhilled.com/smf/)
8: Undefined index:  realName
File: /home/skhille1/public_html/smf/Sources/TPortal.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1NvdXJjZXMvVFBvcnRhbC5waHA=;line=1843)
Line: 1843                    
http://www.skhilled.com/smf/index.php?action=tpadmin (http://www.skhilled.com/smf/index.php?action=tpadmin)8: Undefined index:  3
File: /home/skhille1/public_html/smf/Sources/TPortalAdmin.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1NvdXJjZXMvVFBvcnRhbEFkbWluLnBocA==;line=1845)
Line: 1845

http://www.skhilled.com/smf/index.php?action=tpadmin (http://www.skhilled.com/smf/index.php?action=tpadmin)
8: Undefined index:  5
File: /home/skhille1/public_html/smf/Sources/TPortalAdmin.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1NvdXJjZXMvVFBvcnRhbEFkbWluLnBocA==;line=1845)
Line: 1845

http://www.skhilled.com/smf/index.php?action=tpadmin (http://www.skhilled.com/smf/index.php?action=tpadmin)
8: Undefined index:  4
File: /home/skhille1/public_html/smf/Sources/TPortalAdmin.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1NvdXJjZXMvVFBvcnRhbEFkbWluLnBocA==;line=1845)
Line: 1845

http://www.skhilled.com/smf/index.php?action=tpadmin (http://www.skhilled.com/smf/index.php?action=tpadmin)
8: Undefined index:  6
File: /home/skhille1/public_html/smf/Sources/TPortalAdmin.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1NvdXJjZXMvVFBvcnRhbEFkbWluLnBocA==;line=1845)
Line: 1845                    
http://www.skhilled.com/smf/index.php?action=tpadmin (http://www.skhilled.com/smf/index.php?action=tpadmin)8: Undefined index: 1
File: /home/skhille1/public_html/smf/Sources/TPortalAdmin.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1NvdXJjZXMvVFBvcnRhbEFkbWluLnBocA==;line=1845)
Line: 1845

1.  Cannot save a BBC article with anything in it but no errors are given. It will create an empty article. No matter what you put in it, it will delete it when you click "Save". Please see bottom portion of the 1st image.

2.  When putting a frontpage article in a Front Page Block, it will not show the author. Please see top portion of 1st image, 2nd image, and 1st error.

3.  There is nothing in the dropdown for selecting an article in the Front Page Block's settings. Please see image 3.

4.  I get the 2nd "realName" error when selecting users to see the block in its settings. See 2nd error and notice the double URL's.

5.  Not sure how I got the undefined index # errors and can't recreate them atm.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on December 13, 2010, 08:29:34 PM
I think you have something wrong with your install.
1. I do not have the same problem. No problems with BBC in the articles.
2. No problems here either. Just did a quick frontpage block and added an article. It displays just fine for me.
3. Again, the dropdown displays fine for me.
4 & 5. At this point I don't know, but I bet it's related to you having other problems.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on December 14, 2010, 10:36:17 AM
Ok, I uploaded all new smf files and ran upgrade.php just to make sure my db was right. I then ran a few tests with SMF which ran fine without any errors. No other mods installed. I installed TP and the same errors showed except for the number errors.

I then repeated the same process above BUT I deleted the TP tables from the db this time. No errors when running TP. I created a category (Front Page News) and a html article (named Test) and did not check the "Show Author" setting. No errors.

As soon as I ticked that setting ("Show Author") and saved it, I get the realname error and the author's name does not show in the article/block. If I'm viewing that block's setting page, I get the error with the double URL's for my site.

You cannot uncheck the "Show Author" setting even after saving it again. I am starting to assume that that is part of the problem.

BBC articles still do not work as before. I have not gone over every bit of code to make sure it installed properly but there were no other signs that would indicate it did not. Doesn't mean that it did. LOL

But I get no other errors although I have not tested many of the other settings very thoroughly...but just quickly to see if any errors popped up.

EDIT: When the article is disabled in the front page block settings it still shows on the front page.

If you go to the article itself, you can disable it and it will not show.

EDIT AGAIN (LOL): I've noticed that most of the blocks have option circles instead of checkboxes. Perhaps, there is something wrong with that?
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on December 16, 2010, 12:51:52 AM
I'm not able to reproduce a single error that you have. I have no problem with articles and selecting the "Display Author Avatar/Info" or  the "Display Author" check boxes. I don't see a "Show Author" option in articles.

QuoteEDIT: When the article is disabled in the front page block settings it still shows on the front page.

Huh? lol What do articles have to do with frontpage blocks? Can you explain that better?

QuoteEDIT AGAIN (LOL): I've noticed that most of the blocks have option circles instead of checkboxes. Perhaps, there is something wrong with that?

Are you saying that you have more radio boxes than check boxes? The only radio boxes for blocks that I have are everything down to member group selection. The rest are check boxes.

Can someone else test some of these things?
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: lurkalot on December 16, 2010, 09:17:42 AM
Quote from: IchBin on December 16, 2010, 12:51:52 AM

I don't see a "Show Author" option in articles.


Quote

The only radio boxes for blocks that I have are everything down to member group selection. The rest are check boxes.


Ditto, both of these.

As I know Skhilled, I've sent him one of my testbed logins with admin  access, so he can compare mine to his.  I'd like him to test the same stuff on my site a see if he gets the same results.  I couldn't, but then I wasn't sure exactly what he was doing.  :-[ 
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on December 16, 2010, 01:51:41 PM
OK, let me elaborate.

1.  I created a html article cause I can't create BBC articles, for some reason. (I still haven't looked over the code to make sure it's all there yet but they do work on Lurk's test site. :P )

2.  I created a new Front Panel Block and set it to "Articles In A Category" and saved it.

You can then see that you cannot use the dropdown (it will not show any articles previously created) to select articles on the Blocks page as in the first image below BUT it does show any articles that are ticked to "Show on Frontpage". Same thing happens on Lurk's site.

3.  I checked the box for "Show author?" for that Front Panel Block and saved it. If you try to uncheck it and save it, it will not save it as unchecked. It will always stay checked. Same thing happens on Lurk's site.

4.  You can see the articles in that Front Panel Block BUT it will not show the author.

I believe this (number 3 and number 4 above) are what is causing the "realName" error. And anyone who views index.php will cause that "realName" error and it will fill up your log quickly if a lot of people are viewing index.php.

On Lurk's site, I created an uncategorized article and tried to use that as a test...on my site I assigned it to a category. I noticed this error on his site:

http://thepicvault.com/smf1.1.11/index.php?action=tpadmin;sa=articles;sa=strays (http://thepicvault.com/smf1.1.11/index.php?action=tpadmin;sa=articles;sa=strays)8: Undefined index:  indent
File: /home/thepicva/public_html/smf1.1.11/Themes/default/languages/TPShout.english.php (main sub template - eval?)
Line: 209

Funny the URL says tpadmin articles but the file says tpshout language?...also a template issue?

EDIT: Crap! Deleted it by mistake! LOL
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: lurkalot on December 16, 2010, 10:47:10 PM
Hmm.  Thanks for checking on my testsite Skhilled.  O0

I can see what you were doing now, and understand the problems a bit better now.  That testbed is running SMF2 RC 4 and TP1.0 RC1

Tried this on a second (one of my early) testsites, running the test release from Bloc a while back, this is running SMF2 RC3 and TP1.0 RC1.

Same problems on that one too.  2, 3, and 4  and this error in my log.

http://xxxxxxxxxxx.com/forum/index.php?8:
Undefined index: realNameFile: /home/xxxxxx/public_html/forum/Sources/TPortal.php
Line: 1809

Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on December 16, 2010, 11:32:02 PM
Man this stuff is going to drive me crazy. I didn't realize you were doing most of this with front blocks. I couldn't even get front blocks to display on my site today for admin. I found and fixed that bug, but I can't reproduce the "realName" error. I'll have to come back to this when my brains not so fried from bug hunting.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: lurkalot on December 16, 2010, 11:37:50 PM
Quote from: IchBin on December 16, 2010, 11:32:02 PM

but I can't reproduce the "realName" error. I'll have to come back to this when my brains not so fried from bug hunting.


Brad, if you need a admin test login for my testsite, then just shout.  ;)
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on December 17, 2010, 12:31:43 AM
OK, I've confirmed the article drop down error not showing, as well as the realName error with the show author option not working. If one of you wouldn't mind putting something in the bugtracker that would be great.

I have not been able to confirm the problem with creating BBC articles.

The reason for the error not pointing to the right file, is because you have disable eval for template in the server settings.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: lurkalot on December 17, 2010, 09:01:30 AM
Quote from: IchBin on December 17, 2010, 12:31:43 AM

If one of you wouldn't mind putting something in the bugtracker that would be great.


Thanks for being on the case Brad.  I've added "something" to the bugtracker, just hope it's the required info.  ;)
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on December 17, 2010, 11:34:42 AM
Quote from: IchBin on December 16, 2010, 12:51:52 AM
QuoteEDIT AGAIN (LOL): I've noticed that most of the blocks have option circles instead of checkboxes. Perhaps, there is something wrong with that?

Are you saying that you have more radio boxes than check boxes? The only radio boxes for blocks that I have are everything down to member group selection. The rest are check boxes.

I just meant that while looking at some of the other blocks, most have radio boxes than checkboxes. I was just wondering if that might of had something to do with it or not...probably not.

Quote from: IchBin on December 17, 2010, 12:31:43 AM
I have not been able to confirm the problem with creating BBC articles.

I'll have to check the code when I get a chance...probably sometime today.

Quote from: IchBin on December 17, 2010, 12:31:43 AM
The reason for the error not pointing to the right file, is because you have disable eval for template in the server settings.

For my site? Hmmm, might explain a few other things then. Thanks.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on December 17, 2010, 02:02:10 PM
OK, now for the other error:

http://www.skhilled.com/smf/index.php?action=tpadmin;sa=articles;sa=strays
8: Undefined index: indent
File: /home/skhille1/public_html/smf/Themes/default/languages/TPShout.english.php (main sub template - eval?)
Line: 2091


I get this if I create an article and NOT assign it to a category THEN click on "Uncategorized" to view uncategorized articles.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on December 22, 2010, 05:00:24 PM
Have you disabled template eval yet? That will give a more specific error. I just tried creating a BBC article without a category. Then clicked on uncategorized, and did not get the same error. So it might help if you can give me an error that points to the proper file so I can take a look at the code.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on December 24, 2010, 07:15:28 AM
Sorry, for the delay...Christmas and all.

Here's the error after disabling eval and following it a few lines above and below it. Line 2091 is in red.

Quotehttp://www.skhilled.com/smf/index.php?action=tpadmin;sa=articles;sa=strays
8: Undefined index:  indent
File: /home/skhille1/public_html/smf/Themes/default/TPortalAdmin.template.php (http://www.skhilled.com/smf/index.php?action=admin;area=logs;sa=errorlog;file=L2hvbWUvc2toaWxsZTEvcHVibGljX2h0bWwvc21mL1RoZW1lcy9kZWZhdWx0L1RQb3J0YWxBZG1pbi50ZW1wbGF0ZS5waHA=;line=2091)
Line: 2091

Quoteif(isset($context['TPortal']['allcats']))
        {
            echo '    <p style="text-align: right;">
                            <select name="tp_article_cat">
                                <option value="0">' . $txt['tp-createnew'] . '</option>';
            foreach($context['TPortal']['allcats'] as $submg)
                      echo '
                                <option value="'.$submg['id'].'">',  $submg['indent']>1 ? str_repeat("-", ($submg['indent']-1)) : '' , ' '. $txt['tp-assignto'] . $submg['name'].'</option>';
            echo '
                            </select>
                            <input name="tp_article_new" value="" size="40"  /> &nbsp;
                        </p>';
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on December 24, 2010, 04:54:10 PM
Try this:
Find in TPortalAdmin.php (about line #1359)
        while ($row = tpdb_fetch_assoc($request))
            $allsorted[$row['id']] = $row;


Replace with this:
        while ($row = tpdb_fetch_assoc($request)) {
            if ($row['parent'] != 0)
                $row['indent'] = 1;
            $allsorted[$row['id']] = $row;
        }


Then in TPortalAdmin.template.php find this: (about line #2091)
<option value="'.$submg['id'].'">',  $submg['indent']>1 ? str_repeat("-", ($submg['indent'])-1) : '' , ' '. $txt['tp-assignto'] . $submg['name'].'</option>';

Replace with this:
<option value="'.$submg['id'].'">',  $submg['indent']>0 ? str_repeat("-", ($submg['indent'])) : '' , ' '. $txt['tp-assignto'] . $submg['name'].'</option>';
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on December 24, 2010, 07:20:40 PM
Still get the error. However, I "think" I've found a few bugs in the code. In TPortalAdmin.php on line 163 there is the following code which names the vars for the articles and below that code is the code to create those articles...I think. LOL I'm not a coder.

    if(in_array($tpsub,array('articles','addarticle_php','addarticle_html','addarticle_bbc','addarticle_import', 'strays', 'categories', 'addcategory')))


Most of those have "add" something in them. However, the code for some of them below that line are not the same. I also believe that the numbers in the 'text' part have to do with the number errors I was getting. I can't find all of the numbers 1-6 as only some of them are there along with number 11?

            'categories' => array(
                    'lang' => true,
                    'text' => 'tp-tabs5',
                    'url' => $scripturl . '?action=tpadmin;sa=categories',
                    'active' => $tpsub == 'categories',
                ),
                'addcategory' => array(
                    'lang' => true,
                    'text' => 'tp-tabs6',
                    'url' => $scripturl . '?action=tpadmin;sa=addcategory',
                    'active' => $tpsub == 'addcategory',
                ),
                'articles' => array(
                    'lang' => true,
                    'text' => 'tp-articles',
                    'url' => $scripturl . '?action=tpadmin;sa=articles',
                    'active' => ($context['TPortal']['subaction'] == 'articles' || $context['TPortal']['subaction'] == 'editarticle') && $context['TPortal']['subaction'] != 'strays',
                ),
                'articles_nocat' => array(
                    'lang' => true,
                    'text' => 'tp-uncategorised' ,
                    'url' => $scripturl . '?action=tpadmin;sa=articles;sa=strays',
                    'active' => $context['TPortal']['subaction'] == 'strays',
                ),
                'addarticle' => array(
                    'lang' => true,
                    'text' => 'tp-tabs2',
                    'url' => $scripturl . '?action=tpadmin;sa=addarticle_html' . (isset($_GET['cu']) ? ';cu='.$_GET['cu'] : ''),
                    'active' => $context['TPortal']['subaction'] == 'addarticle_html',
                ),
                'addarticle_php' => array(
                    'lang' => true,
                    'text' => 'tp-tabs3',
                    'url' => $scripturl . '?action=tpadmin;sa=addarticle_php' . (isset($_GET['cu']) ? ';cu='.$_GET['cu'] : ''),
                    'active' => $context['TPortal']['subaction'] == 'addarticle_php',
                ),
                'addarticle_bbc' => array(
                    'lang' => true,
                    'text' => 'tp-addbbc',
                    'url' => $scripturl . '?action=tpadmin;sa=addarticle_bbc' . (isset($_GET['cu']) ? ';cu='.$_GET['cu'] : ''),
                    'active' => $context['TPortal']['subaction'] == 'addarticle_bbc',
                ),
                'article_import' => array(
                    'lang' => true,
                    'text' => 'tp-addimport',
                    'url' => $scripturl . '?action=tpadmin;sa=addarticle_import' . (isset($_GET['cu']) ? ';cu='.$_GET['cu'] : ''),
                    'active' => $context['TPortal']['subaction'] == 'addarticle_import',
                ),
                'clist' => array(
                    'lang' => true,
                    'text' => 'tp-tabs11',
                    'url' => $scripturl . '?action=tpadmin;sa=clist',
                    'active' => $tpsub == 'clist',
                ),
            );


but as you can see, almost all of them start with add something and end with the same thing...except for some of them. One in particular doesn't have the same underscore as in line 163 and also does not start with it but ends with it...'addarticle_html'. It starts with 'addarticle' but ends with 'addarticle_html'. Also 'article_import' should read 'addarticle_import'.

When I first opened the file, I noticed a few spelling typos in the comments. While scrolling down the page I noticed all of the above. The comments typos are at a few locations but since they are only comments they don't matter.  :D

Like I said, I'm no coder so forgive me if I'm off base.  ;D

EDIT: Another small issue is when you create an html article and have wysiwyg turned off and type a line or 2 of text then turn it on, the wysiwyg buttons will overlap the first line or 2. The text will still be there and it will fix itself after you save it. If you turn on wysiwyg first then type it will not do this.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on December 28, 2010, 09:47:20 PM
In my post above changed this code:
        while ($row = tpdb_fetch_assoc($request)) {
            if ($row['parent'] != 0)
                $row['indent'] = 1;
            $allsorted[$row['id']] = $row;
        }


To this:
        while ($row = tpdb_fetch_assoc($request)) {
            $row['indent'] = $row['parent'] != 0 ? 1 : 0;
            $allsorted[$row['id']] = $row;
        }


The code you referenced is ok. All it's doing is creating an array for the sub menu buttons. The index that you mentioned with the word "add" in them should not matter.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on February 13, 2011, 06:04:06 AM
Sorry for the delay. Yes, that fixed the error. Also, Lurkalot found out why my BBC articles were not working. It was because I can clicked on "Toggle View". For some reason it is set to enabled or shows as darkened (the bbc button) by default. Changing it allows the bbc articles to be saved.

So, is there a way to change the default setting of that button? I assume this was due to an upgrade, either smf and/or TP.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: IchBin on February 13, 2011, 04:48:21 PM
Not that I'm aware of. The BBC editor is the SMF editor from what I can tell. I bet that when you upgrade or something that the wysiwig option is turned on in your profile to show by default.
Title: Re: Some TP 1.0 RC1 for RC4 Issues
Post by: Skhilled on February 17, 2011, 09:18:41 AM
That figures. Thanks for the help. On to the next issue. LOL