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: 136
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 115
  • Total: 115

Problems with articles and categories

Started by oztramm, August 22, 2011, 12:22:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oztramm

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:



  • When i go to TinyPortal -> Categories -> CAT LIST and press button "save" there i recieve message "An Error Has Occurred! The database value you're trying to insert does not exist: val".

  • When i try to create a +bbc article i get a VERY wide block "TP Admin" in all browsers,  everything goes OK except width of this block is much more than my screen can show.

  • 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)".



Please tell me how i can solve my troubles


oztramm

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'])
);

oztramm

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

lurkalot

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..

oztramm

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...

IchBin

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.

oztramm

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  :)

IchBin

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,
)
);

oztramm


This website is proudly hosted on Crocweb Cloud Website Hosting.