#1069 Forums : Edit post generates error

v1.8.4
closed-accepted
4
2005-03-17
2003-11-25
No

Existing forum item> click on edit and on this URL:
http://www.dennisgdaniels.com/tiki-view_forum.php?comments_offset=&comments_sort_mode=&comments_threshold=&comments_find=&comments_threadId=82&openpost=1&forumId=7&comments_maxComments=20
you'll get this
error:
Warning: mysql error: You have an error in your SQL
syntax near 'threadId` LIMIT ,20' at line 4 in query:
select * from `tiki_comments` where `object`=? and
`type` = ? and `objectType` = 'forum' and `parentId` =
? order by `, `threadId`
in /opt/www/tikiwiki/lib/tikidblib.php on line 125
Values:
Array ( [0] => 7 [1] => s [2] => 0 )
$result is false
$result is empty

Discussion

  • Philippe Cloutier

    • milestone: 316038 --> 356877
    • summary: cvs: edit forum= errors --> Forums : Edit post generates error
     
  • Philippe Cloutier

    Logged In: YES
    user_id=738765

    This URL gives me that on a fresh CVS but could you indicate
    how to get there? I edited some posts and didn't get the
    error. Does it keep you from editing?

     
  • Philippe Cloutier

    • milestone: 356877 --> 374908
     
  • Philippe Cloutier

    Logged In: YES
    user_id=738765

    A third dupe for this was opened today, might be good to get
    a better description.

     
  • Terris Linenbach

    Logged In: YES
    user_id=155319

    I had problems in the first and second topics in a new
    forum. There were no other forums. I deleted the posts and
    can no longer reproduce it.

     
  • Terris Linenbach

    Logged In: YES
    user_id=155319

    I can now reproduce this. Add "new forum posts" module and
    click on a post in the forum. Click on the edit icon. tw 1.8.

     
  • Philippe Cloutier

    • assigned_to: nobody --> chealer
    • milestone: 374908 --> 392507
    • priority: 5 --> 4
    • status: open --> open-fixed
     
  • Philippe Cloutier

    Logged In: YES
    user_id=738765

    I was finally able to reproduce this.
    The URL generated for edit is wrong. Compare a HEAD test
    with a BRANCH-1-8 one :
    comments_offset=&comments_sort_mode=&comments_threshold=&comments_find=&comments_threadId=264&openpost=1&forumId=2&comments_maxComments=20
    comments_offset=1&comments_sort_mode=commentDate_desc&comments_threshold=0&comments_find=&comments_threadId=13&openpost=1&forumId=1&comments_maxComments=0
    The first one has the two first request parameters empty.
    This is causing the query error.

    Bits like this one :
    if (!isset($_REQUEST["comments_offset"])) {
    $comments_offset = 0;
    } else {
    $comments_offset = $_REQUEST["comments_offset"];
    }

    are giving default values to the $_REQUEST parameters as
    expected. Smarty uses by example
    {$smarty.request.topics_offset} to generate the link
    (href="tiki-view_forum.php?comments_offset={$smarty.request.topics_offset}&comments_sort_mode={$smarty.request.topics_sort_mode}&comments_threshold={$smarty.request.topics_threshold}&comments_find={$smarty.request.topics_find}&comments_threadId={$thread_info.threadId}&openpost=1&forumId={$forum_info.forumId}&comments_maxComments={$comments_maxComments}").
    The problem is that $_REQUEST updates in the PHP code are
    not passed to Smarty. I had a chat this morning with
    #smarty's messju and learned that Tiki 1.8's Smarty 2.6.0
    was the last version with this problem. Later versions (such
    as the 2.6.2 use on HEAD) ship by default with
    request_use_auto_globals = true.
    I'll therefore close this bug on 1.9 release, although a
    missing real check on request values is also pointed.

     
  • Damian Parker

    Damian Parker - 2004-08-26
    • status: open-fixed --> closed-out-of-date
     
  • Philippe Cloutier

    • milestone: 392507 --> v1.8.4
    • status: closed-out-of-date --> open-accepted
     
  • bertrand Gugger

    bertrand Gugger - 2005-03-17
    • status: open-accepted --> closed-accepted
     
  • bertrand Gugger

    bertrand Gugger - 2005-03-17

    Logged In: YES
    user_id=379264

    Hello,
    This is a broadcast message for all open bugs left before 2004/01/05.
    We hope it was checked but no bug update took place.
    The bug you reported may have been fixed.
    Additionally, if you are using an older form of TikiWiki,
    it is highly recommended you update at least to 1.8.5
    with new security fixes.

    So we open a procedure over the 2 next weeks:
    Please, check your bug or request.
    If you feel it's not relevant anymore, then close it.
    But, if you mind it's still current,
    we invite you to open a new fresh request.

    At the end of this period,
    an automatic cleaning with notifications will take place.

    Tikily yours,
    --
    Tikiwiki Bugs Cleaners
    (contact ---> toggg)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks