TinyPortal

Development => Support => Topic started by: oztramm on August 22, 2011, 12:22:34 AM

Title: Problems with articles and categories
Post by: oztramm on August 22, 2011, 12:22:34 AM
Link to my site: dev.g-o-d.ru
SMF version: 2.0
TP version: TP 1.0 RC2
Default Forum Language: Russian
Theme name and version: default
Browser Name and Version: Chrome 13.0.782.112 m / Opera 11.50
Mods installed: TinyPortal
Related Error messages:





Please tell me how i can solve my troubles
Title: Re: Problems with articles and categories
Post by: IchBin on August 22, 2011, 12:48:30 AM
I promise the search button doesn't bite. You should try it. :)

1. http://www.tinyportal.net/index.php?topic=34184.msg273279#msg273279
2. http://www.tinyportal.net/index.php?topic=34336.0
3. http://www.simplemachines.org/community/index.php?topic=27642.msg3136501#msg3136501
Title: Re: Problems with articles and categories
Post by: oztramm on August 22, 2011, 02:28:17 AM
Thank you IchBin! With your help have been corrected 2 errors.
But the last error was not corrected. In the theme for the third error is written:

QuoteThe database value you're trying to insert does not exist: com

but I have a different error message:

Quote"Wrong value type sent to the database. Array of integers expected. (artid)"

How can I fix it?

P.S. I replaced the code in this:


// if the count differs, update it
if($ccount != $article['comments'])
$smcFunc['db_query']('', '
UPDATE {db_prefix}tp_articles
SET comments = {int:com}
WHERE id = {int:artid}',
array('com' => $ccount, 'artid' => $article['id'])
);
Title: Re: Problems with articles and categories
Post by: oztramm on August 22, 2011, 02:36:08 AM
in addition to the third error... ^
new trouble =(

4. When i click on "Submissions" (TP Admin -> Submissions) i get error message:"The database value you're trying to insert does not exist: ids"


p.p.s.

search does not like me = (
how to fix some bugs found itself, but adjust the described problems
Title: Re: Problems with articles and categories
Post by: lurkalot on August 22, 2011, 09:25:09 AM
Quote from: oztramm on August 22, 2011, 02:36:08 AM
in addition to the third error... ^
new trouble =(

4. When i click on "Submissions" (TP Admin -> Submissions) i get error message:"The database value you're trying to insert does not exist: ids"


p.p.s.

search does not like me = (
how to fix some bugs found itself, but adjust the described problems

Please check to see if you have any articles that are not approved. Approve them, and check to see if the "Submissions" page works after that..
Title: Re: Problems with articles and categories
Post by: oztramm on August 22, 2011, 09:54:36 AM
Thank you lurkalot, i will check. But i can't approve the articles... :

When i try to move my article to another category (TP -> Articles -> Uncategorized  -> [checking checkbox near my article and selecting new category] -> Save)  i get error message "Wrong value type sent to the database. Array of integers expected. (artid)".

I don't know how to fix it...
Title: Re: Problems with articles and categories
Post by: IchBin on August 22, 2011, 03:10:07 PM
Quote from: oztramm on August 22, 2011, 02:36:08 AM
in addition to the third error... ^
new trouble =(

4. When i click on "Submissions" (TP Admin -> Submissions) i get error message:"The database value you're trying to insert does not exist: ids"


p.p.s.

search does not like me = (
how to fix some bugs found itself, but adjust the described problems

When posting errors it helps if you post the full error which includes the filename and file line number that the error occurred on.
Title: Re: Problems with articles and categories
Post by: oztramm on August 22, 2011, 09:47:27 PM
3. When i try to move my article to another category (TP -> Articles -> Uncategorized  -> [checking checkbox near my article and selecting new category] -> Save)  i get error message "Wrong value type sent to the database. Array of integers expected. (artid)".


http://.../index.php?action=tpadminWrong value type sent to the database. Array of integers expected. (artid)
Function: do_postchecks file: Sources/TPortalAdmin.php
line: 2923

p.s. didnt know how to see logs  :)
Title: Re: Problems with articles and categories
Post by: IchBin on August 22, 2011, 10:28:36 PM
Find in Sources/TPortalAdmin.php

$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}tp_articles
SET category = {int:cat}
WHERE id IN ({array_int:artid})',
array(
'cat' => !empty($newcategory) ? $newcategory : $category,
'artid' => implode(',' ,$ccats),
)
);



Replace with this:
$request = $smcFunc['db_query']('', '
UPDATE {db_prefix}tp_articles
SET category = {int:cat}
WHERE id IN ({array_int:artid})',
array(
'cat' => !empty($newcategory) ? $newcategory : $category,
'artid' => $ccats,
)
);
Title: Re: Problems with articles and categories
Post by: oztramm on August 22, 2011, 11:45:07 PM
Thank you, Ich Bin!