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: 195,853
  • Total Topics: 21,290
  • Online today: 1,590
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 171
  • Total: 171

SMF 1.1.11 + TP 1 beta 5.2 - Issues and some bug corrections

Started by Pulha, July 23, 2010, 01:30:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pulha

First of all sorry these repost, if is possible please delete my reply at http://www.tinyportal.net/index.php?topic=32368.msg265174#msg265174

So to begin the issues ive found : :(

I
Create an simple html article, i.e : " Hello World ... etc"
Create a Front Panel Block , single article type
Result  : i see the block but not the article (it seems that doesnt parse it or so)

UPDATE : SOLVED (smf_tp_settings db table with bad configurations) - I supose i messed up here.

I.I
After i created my first Category and put inside the article (above mentioned)
Went to block and changed the type to : Articles in Cat.
Result (at home link):
  Database error
  "Please try again. If come back to these, please contact an administrator"

UPDATE (theres an error in Sources\TPortal.php)

Find and Select
$request =  tp_query("SELECT art.id, art.subject, art.date, art.category, art.authorID, art.shortname
IFNULL(mem.realName,art.author) as realName FROM " . $tp_prefix . "articles AS art
LEFT JOIN " . $db_prefix . "members AS mem ON (art.authorID = mem.ID_MEMBER)
WHERE " . $fetchtitles . "
AND art.off=0
AND art.category>0
AND art.approved=1", __FILE__, __LINE__);


Replace with
$request =  tp_query("SELECT art.id, art.subject, art.date, art.category, art.authorID, art.shortname,
IFNULL(mem.realName,art.author) as realName FROM " . $tp_prefix . "articles AS art
LEFT JOIN " . $db_prefix . "members AS mem ON (art.authorID = mem.ID_MEMBER)
WHERE " . $fetchtitles . "
AND art.off=0
AND art.category>0
AND art.approved=1", __FILE__, __LINE__);


Missing a "," in original.
-------------------------------------------------------------

Note : if i use other type blocks on front block they are shown...

II
As an admin i can not see Front Blocks (at home link) but everyone else (users that are not admin) can.

UPDATE : SOLVED (smf_tp_settings db table with bad configurations)

III
The button Forum (that links with action= "forum") takes me to a blank page.
:-\ :( :(

IV (minor)
At admin > articles and cat. > editing an category the option cat list gives me :
" Sorry, you are not allowed to view these article" ...  :-\


- Spent 2 days reviewing configurations, permissions, database and (trying) to debug php but could not put these to work. :(

Thank you for any help

PS - I did an fresh install of SMF 1.1.11 + Tinyportal (latest version 1b5.2) ... still have same problems . The theme is default theme.


IchBin

Hmm... I thought that the l.l error was fixed in beta 5.2. So according to your list, you only need help on lll and lV ? A little hard to follow what you're doing in that post with so much info. Do you see any errors in your log for when you are trying to go to action=forum?

For lV, are you clicking on the catlist link in the admin? Do you have any categories created yet?

Pulha

Hi there ... im still working on figure out some more bugs ...

Now ... at point:

III forum issue is solved ... cant remember how exactly cause ive been stucked in so many errors ...

IV yes im admin and still get that error when accessing there

Note : After getting some errors about TPsubs.template.php ive fixed them by find ['by'] and replace for ['tp-by']

Another issue ive found is when applying permissions on blocks (toggle all) the saved ids are all except the id = 1 (administrators), so far so good if in php code these is taken in consideration, but it isnt (i supose) and thats why as an admin i cant (at home link) see any blocks ... so ive went to database and updated it manualy (wich is an temporarly solution); and yes i have admins see all blocks enabled.

Pulha

--- Status UPDATE ---

Well so far the only big issue im trying to understand is why frontpanel area dont show article blocks ...

If i pass all blocks to upper panel they show nice... if i move em to frontpanel they dont ...

Setup
All panels are active (default values)
What to display on frontpage: Frontpage (ofc)
How frontpanel will be shown with content:Frontpanel will be added before content
Additional panels to display on frontpage: All checked
Articles layout for the frontpage: A
Layout types: Normal
Rest is default...

Udpate 1 :
Found why i dont see the blocks at frontpanel it cause what i said above :
Quote
Another issue ive found is when applying permissions on blocks (toggle all) the saved ids are all except the id = 1 (administrators), so far so good if in php code these is taken in consideration, but it isnt (i supose) and thats why as an admin i cant (at home link) see any blocks ... so ive went to database and updated it manualy (wich is an temporarly solution); and yes i have admins see all blocks enabled.

Update 2 :
(edited smf_tp_blocks table and add the value 1 to permissions field (ie : -1,0,1, .. )  of each block)
Now i see the block but doesnt render the article .... went to article cat to see permissions and its fine ... grrrrr
if someone could tell me what phps are involved to manage these issue i appreciate :)

Udpate 3 :
Still not rendering article but meanwhile ive fixed the problem of each time we edit an block as admin i cant see it ..so at :

Sources\TPortalAdmin.php
find:
$request = tp_query("SELECT access FROM " . $tp_prefix . "blocks WHERE id = ".$bl, __FILE__, __LINE__);
if(tpdb_num_rows($request) > 0)
{
$row = tpdb_fetch_assoc($request);
tpdb_free_result($request);
$request = tp_query("UPDATE " . $tp_prefix . "blocks SET access = '" . implode(",",$blo) . "' WHERE id = ".$bl, __FILE__, __LINE__);
}

replace with:
$request = tp_query("SELECT access FROM " . $tp_prefix . "blocks WHERE id = ".$bl, __FILE__, __LINE__);
if(tpdb_num_rows($request) > 0)
{
$row = tpdb_fetch_assoc($request);
tpdb_free_result($request);
$request = tp_query("UPDATE " . $tp_prefix . "blocks SET access = '" . "1,". implode(",",$blo) . "' WHERE id = ".$bl, __FILE__, __LINE__);
}

find:
// construct the access++
$request =tp_query("UPDATE " . $tp_prefix . "blocks SET
access2 = '" . implode(",",$access) .  "',
access = '" . implode(",",$tpgroups) .  "',
lang = '" . implode("|",$lang) .  "',
editgroups = '" . implode(",",$editgroups) .  "'
WHERE id = " . $where , __FILE__, __LINE__);

replace with:
   // construct the access++
$request =tp_query("UPDATE " . $tp_prefix . "blocks SET
access2 = '" . implode(",",$access) .  "',
access = '" ."1,". implode(",",$tpgroups) .  "',
lang = '" . implode("|",$lang) .  "',
editgroups = '" . implode(",",$editgroups) .  "'
WHERE id = " . $where , __FILE__, __LINE__);


Well these is kind harcoded but it works for these issue. :P


Update 4 :
Still not rendering article but meanwhile ive fixed 1 more problem, each time i went to Panels and Blocks it generates at error log errors (foreach() bla bla) at themes/default/TPortalAdmin.template.php so here is the fix :

themes/default/TPortalAdmin.template.php
search :
foreach($context['TPortal']['edit_articles'] as $article){
ADD before:
if (isset ($context['TPortal']['edit_articles']))

search :
foreach($context['TPortal']['edit_articles'] as $cats){
ADD before:
if (isset ($context['TPortal']['edit_articles']))

Pulha

Ok so far what i have found about not rendering blocks single article type...

The problem is on the panels ... if i have 1 block (single article type) in one panel, lets say left panel and i use other block (single article type) on, lets say, frontpage panel it will not render last one.

In another words it seams that after render single article blocks in 1 panel, if the next panels have also single article blocks they will not be rendered (blocks appear but empty)

:(

Anyone noticed that ?

IchBin

Well you've posted so much random information in here, I don't know what the hell you got going on. I don't have the time to dwindle through it all, so I will kindly bow out of this topic and let some other kind person step in if they dare.

Freddy

These are not really questions for us as they are about the mechanics of TP.  I think you should summarise your bugs neatly with any information you have worked out and post them in Bloc's thread over on SMF.

Pulha

Yes true ... im sorry about so many info ... i was posting while finding and (sometimes) fixing .... ill resume the isssues and fixes ASAP.

This website is proudly hosted on Crocweb Cloud Website Hosting.