Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Would appreciate help finding a suitable tool to debug.

whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

I really like the Split/Merge FE plugin, as it offers the option to move comments into existing threads.

Unfortunately it doesn't work in 2.1, and I don't know if the original author intends to update it.

Clicking Move is meant to bring up a form, the same as Split does, but it only brings up a very small box that you can only close.

(See here: http://vanillaforums.org/discussion/23816/splitmerge-fe-1-01-on-vanilla-2-1b1-move-comment-not-working#latest for an image.)

Is there a suitable tool I could use to see what is happening to stop the form from rendering properly?

None of the Firefox developer tools I've looked at seem to do the job.

As always, any help appreciated.

Thanks.

Comments

  • businessdadbusinessdad Stealth contributor MVP

    I didn't have a look at it, but Firebug is the best tool I can think of, for JavaScript. It's possible, however, that the issue is in the PHP code, due to the differences between 2.0 and 2.1.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    @businessdad

    Thanks for the reply.

    Nothing I can see in Firebug seems to track the events.

  • hgtonighthgtonight ∞ · New Moderator

    @whu606 Do you use FireQuery with Firebug? I find it useful for debugging JS.

    Regardless, you should be able to look in the console to see if a response is malformed. The uri that is POSTed relates to a specific function on a specific controller in a specific application.

    P.S. I am pretty sure you know this stuff already :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    whu606
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    @hgtonight

    I actually don't know any proper coding at all.

    I can hack my way through where there are models to work from, without ever really understanding the 'why' of things.

    I shall have a crack at FireQuery.

  • hgtonighthgtonight ∞ · New Moderator

    If you post the net request in the console, I can point you to the right spot in the code. :D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    @hgtonight

    Well, baby steps are being made!

    Both the Split (which works) and the Merge (which doesn't) make similar requests:

    GET http://localhost/2.1new/vanilla/moderation/splitcomments/5734?DeliveryType=VIEW

    GET http://localhost/2.1new/vanilla/moderation/movecomments/5734?DeliveryType=VIEW

    However, only the Split produces any HTML code, which is, of course why the Merge form doesn't show properly.

    As to what is causing that...

    Well, I shall stick my head under the hood, and hope to see a loose lead.

  • peregrineperegrine MVP
    edited May 2013

    problem I believe is in line 131 or vicinity

    call to a member function Put() on a non-object.

    in class.splitmergefe.plugin.php

    </p> <pre> if ($Sender->Form->ErrorCount() == 0) { $ResultDiscussionID = $ResultDiscussion->DiscussionID; $CommentModel = new CommentModel(); $CommentModel->SQL ->Update($CommentModel->Name) ->Set('DiscussionID', $ResultDiscussionID) ->WhereIn('CommentID', $DiscussionCommentIDs) ->Put(); </pre> <p>

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited May 2013

    call to a member function Put() on a non-object.

    something wrong here WhereIn and $DiscussionCommentIDs

    ->WhereIn('CommentID', $DiscussionCommentIDs)

    if you change it to Where - you don't get error, but you lose functionality.

    $DiscussionCommentIDs - is probably null.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • businessdadbusinessdad Stealth contributor MVP
    edited May 2013

    @peregrine said:
    call to a member function Put() on a non-object.
    something wrong here WhereIn and $DiscussionCommentIDs

    >

    ->WhereIn('CommentID', $DiscussionCommentIDs)

    >

    if you change it to Where - you don't get error, but you lose functionality.

    $DiscussionCommentIDs - is probably null.

    Or, perhaps, CommentID is an ambiguous columns. I stumbled upon this type of issue in the past. In Vanilla 2.1, for some reason queries are written as

    <br />Discussion d
    JOIN
    Discussion d2 on
      (d2.DiscussionID = d.DiscussionID)
    
    

    Apart from making little sense to me, they can cause the "ambiguous column" error. More specifically, in case of discussions, DiscussionID would exist in both d and d2. Perhaps the issue is related to a query like

    <br />Comment c
    JOIN
    Comment c2 on
      (c2.CommentID = c.CommentID)
    
    

    In such case, you can try changing WhereIn('CommentID', $DiscussionCommentIDs) to WhereIn('c.CommentID', $DiscussionCommentIDs) and see if it works.

    Note: I didn't look at the code yet, I'm just speculating.

  • peregrineperegrine MVP
    edited May 2013

    @businessdad said:
    Note: I didn't look at the code yet, I'm just speculating.

    good point. but in this case ....

    I would think the problem lies with $RequestArgs pulling wrong discussion id - consequently $DiscussionCommentIDs is null which leads to
    ->WhereIn('CommentID', $DiscussionCommentIDs)
    null PUT


    http://vanillaforums.org/discussion/comment/183775/#Comment_183775

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.