Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

[solved] bookmarking?

Bookmarking isn't working on my 1.0 pre release version.
The option just doesn't appear to exist.

Is there a new setting I'm overlooking?

Comments

  • MarkMark vanilla
    Bookmarking comes in Vanilla as a standard feature.

    Are you saying that the "bookmark this discussion" option doesn't appear in your panel when viewing a discussion?
  • Check your Account -> Forum Preferences options and make sure your bookmarks are appearing if the case is that they don't appear in the sidebar. It's one of those things you need to enable/disable yourself :D
  • Ok, I CAN click "bookmark this discussion" in the sidebar of a topic.

    I get this error:

    "Failed: undefined (undefined)"

    And there seem to be no preferences or settings for bookmarks in either the board itself, or my profile/account.

    Wonder what's up here? Anyone else have trouble with bookmarking?
  • "Failed: undefined (undefined)"

    -- classic error message
  • yeah, i think it's a failed ajax request in this case. but i'm not sure.
  • MarkMark vanilla
    It most certainly is a failed ajax error message.

    Why don't you try the standard ajax debugging method:

    Open up js/ajax.js and uncomment line 50 so it looks like this:

    document.location = DataSource;

    This will make it so that the ajax request will instead redirect you to the page that performs the action. So, when you click any ajax button, if there it sends you to the wrong place, you will see where it is sending you and (hopefully) how to fix it. Alternately, if it does go to the right place, it should give you an error message indicating why the action didn't work.
  • Maybe that should get tossed up in a faq or wiki or something. You have tossed out this tidbit of info once or twice already. And it is very helpful for finding path and ajax errors.
  • I uncommented line 50 of the js/ajax.js and the results are the same, same error.

    I checked permissions all through the installed application, most everthing is 755, there are a few files in the appg folder which are 655

    Disabled all extensions, same error.

    The bookmarking display is working, I added a title for bookmarked topics and can now see that they have been bookmarked, but the error occurs when clicking "Bookmark this discussion" and "Unbookmark this discussion."

    Nothing shows up in the sidebar either, no bookmark list.

    I don't get it.
  • MarkMark vanilla
    After you uncomment the line, you will likely need to hard-refresh your browser so that it's cache of the file is updated.
  • Nope, same results. Same error.

    On a shared linux host, with apache, mysql db.

    bummer.
  • MarkMark vanilla
    I realize it's been 2 days since you first reported the problem, but that doesn't mean it won't get fixed. It is happening for a reason, and we will figure it out.

    First of all:

    Nothing shows up in the sidebar either, no bookmark list.

    If you don't have any bookmarked discussions, you won't see anything in the sidebar. If you *do* have discussions bookmarked, you still won't see anything in the side bar UNLESS you go to your account / preferences and check the box next to "Display your bookmarks in the control panel".

    Now, back to your error. Let's take it back a step further and see if we can find out where that alert message "failed: undefined (undefined)" is coming from.

    I'd bet my ass that there is something wrong with your js file, because that error message occurs AFTER the ajax method has been called and has failed, so let's make sure that it is actually hitting line 50 of your ajax.js file.

    Open up your js/ajax.php file and on line 49 add this:

    alert('this is a test');

    Then go back and try to bookmark something. If you don't get a "this is a test" alert but you do get the failed alert, then I still contend that you aren't viewing the latest version of your js file. But we can keep stepping back until you do see that message.

    If, on the other hand, you DO see that message, then go back and edit it again. This time make that alert say:

    alert('redirecting to '+DataSource);

    Then go back and try to bookmark again. This time you should see where the ajax call was trying to send you.

    That's enough for now, I guess.

    Good luck :)
  • MarkMark vanilla
    Oh, finally, if your forum is online, can you whisper the location of it to me so I can test? Can you also create an account for me so I can get in and test this out?
  • Ok,

    First, thank you for the time and guidance.

    I've done the following:

    In account settings, there doesn't appear to be a place to choose "Display bookmarks in the control panel," rather, I see Forum Preferences/Display list appendices in the control panel, and it's checked.

    I added
    alert('this is a test');
    to line 49 of the ajax.js

    When bookmarking or unbookmarking now I get both errors in unique windows. The topmost window says "this is a test" and the window below says "error: undefined (undefined)"

    After adding the code to display the location vanilla is trying to send my browser to after bookmarking or unbookmarking, the errors behaves similarly, this time the error is:
    redirecting to /community/ajax/switch.php?Type=Bookmark&Switch=1&DiscussionID=127
    And again, it is the topmost error, and below is another window with my little friend:
    error: undefined(undefined)
    The ajax folder's permissions are set to 755
    the switch.php is setto 755 as well.

    Interesting...

    Another thing to note:

    When these lines are uncommented, vanilla cannot enable or disable any extensions. the error "failed to modify file" comes up, and that's all she wrote.

    When I comment them again, the extensions behave as expected.

    I have the "Discovery" extension enabled, but during the registration process, only the "why do you want to join" question displays, not the "how did you find out about this forum" question. This might be a clue, but since the bookmarking problem is the same with or without any extensions at all, this might not matter at all.
  • MarkMark vanilla
    Okay, the first problem:

    1. The "Display bookmarks in the control panel" is an extension. I don't think it's in the add-on directory yet, but you can get it from svn here:

    http://lussumo.com/svn/vanilla/trunk/extensions/

    It's called "PanelLists".

    Now, on to the js bug...
  • MarkMark vanilla
    Can you comment out that "redirecting to" line now?
  • Ok, this is solved.

    Once the PanelLists extension was installed, set to 755, and then activated the board behaves just like this one.
    That's it.

    I guess it wasn't in the pre release version 1 zip. It is now.

    Interesting process,this code is beautiful.
  • MarkMark vanilla
    Thanks!

    But that bug shouldn't be happening. I'm going to investigate further and see if I can duplicate by disabling that extension on my local install.

    If I can duplicate it, that's a huge bug you found. Thanks!

    I'll let you know what happens.
  • Great, well, I hope all this helps out.

    If you need me to uncomment or comment out anything for future use, I'd be glad to help in any way.

    Thanks for your help!
  • MarkMark vanilla
    Sure enough, I took a look at the code and there was a problem where some js that should have been in the PanelLists extension was still in the core. When the panel lists were disabled, it caused the bug you were getting. I've moved the code out of the core and into the panellists extension. All is updated in svn.
  • Glad my issue helped sort out Vanilla for everyone!

    :)
This discussion has been closed.