WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: My Page Order] Installed, but Doesn't Drag & Drop (51 posts)

  1. dangerlarson
    Member
    Posted 5 years ago #

    I installed the plugin like I usually do (and per instructions), and when I go into the admin page for it, I see the 4 arrow icon when I hover over a page.

    I then click on it and drag but nothing happens - just starts highlighting text. None of the buttons do anything, either.

    I tried in multiple browsers and no dice - just downloaded the plugin straight from here so that shouldn't be a problem if everyone else is getting it to work, right? Any ideas?

  2. WebDev WaxLotus LLC
    Member
    Posted 5 years ago #

    It sounds like an AJAX file permission problem. What do other plugin users say at the author's site?

  3. froman118
    Member
    Posted 5 years ago #

    Sounds like the scriptaculous Javacript libraries aren't being loaded at all. This has happened before and it usually seems to be another plugin doing something with the includes that it shouldn't. If the plugin page is about to be viewed, I simply do the following call:

    wp_enqueue_script('scriptaculous');

    If you look at the page source while you're on the My Page Order page, do you see any scriptaculous includes in the head?

  4. sitecreations
    Member
    Posted 5 years ago #

    Definitely doesn't work with 2.6.3. Installed properly.

  5. gnfoster
    Member
    Posted 5 years ago #

    Ahh, but it does work in 2.6.3

    I have it installed on about 4 web pages and each of them is 2.6.3 and each of them is working. I just checked it before this post.

    Don't give up!!

  6. froman118
    Member
    Posted 5 years ago #

    You've got another plugin doing something naughty with JavaScript includes. The script.aculo.us includes get queued up when the plugin page is being loaded so another plugin is screwing with the script queue.

  7. jottlieb
    Member
    Posted 5 years ago #

    New JS classes in WP 2.8 do also break the plugin :(

  8. jottlieb
    Member
    Posted 5 years ago #

    Ok, my guess was not true. It's the new wp_enqueue_script handling in WP 2.8 (beta2) that breaks the plugin.
    I've fixed it as follows:

    function mypageorder_js() {
    	if ( $_GET['page'] == "mypageorder" ) {
    		echo "<script type='text/javascript' src='http://example.org/wordpress/wp-admin/load-scripts.php?c=1&load=hoverIntent,common,jquery-color,jquery-ui-core,jquery-ui-sortable&ver=68c730824fe93e0fc4dc0373bd1d3632'></script>";
    	}
    }
    
    add_action('admin_menu', 'mypageorder_menu');
    //add_action('admin_menu', 'mypageorder_js_libs');
    add_action('admin_head', 'mypageorder_js');
  9. Steven
    Member
    Posted 5 years ago #

    I just found another way to fix the issue in WP2.8:

    function mypageorder_js_libs() {
    	if ( $_GET['page'] == "mypageorder" ) {
    		wp_enqueue_script('jquery');
    		wp_enqueue_script('jquery.ui-core', get_bloginfo('siteurl').'/wp-includes/js/jquery/ui.core.js' , array('jquery'));
        wp_enqueue_script('jquery.ui-sortable', get_bloginfo('siteurl').'/wp-includes/js/jquery/ui.sortable.js' , array('jquery') );
    	}
    }

    Mind the change of the - into a . in the script names.

    Probably also applies to the My Category Order and My Link Order plugins.

    [UPDATE] Humm... strange, haven't changed anything since I applied the changes but all of the sudden my fix stopped working. Have now also tested jottlieb's fix and that one keeps working :)

  10. froman118
    Member
    Posted 5 years ago #

    Thanks for looking into it guys. Not sure why it would stop working since all the other parameters on wp_enqueue_script are optional. There's also a new admin_enqueue_scripts hook I'm going to try using. Hopefully I'll have time to get everything updated before 2.8 is released.

  11. froman118
    Member
    Posted 5 years ago #

    Got it. The scripts are being enqueued fine, but they are being included by default in the footer on every single Admin page now. I was just sticking the .sortable() call in a script tag which worked fine when the jQuery files were included in the header, but not so much now that they're in the footer. Just need to use ready() to wait until everything loads:

    jQuery(document).ready(function(){
    jQuery("#order").sortable({
    placeholder: "ui-selected",
    revert: false,
    tolerance: "pointer"
    });
    });

    The workarounds you guys mentioned shouldn't be used because it will lead to the jQuery files being included more than once (I think).

    I'll make sure I have this done for the 2.8 release. I'll fix it on my other plugins too and I want to move to the new Widget API and finally add support for multiple My Category Order and My Link Order widgets.

  12. Steven
    Member
    Posted 5 years ago #

    Super, I'm looking forward to the new releases ;)

  13. jottlieb
    Member
    Posted 5 years ago #

    Thank you for your quick answer froman!

    My script include should only start when the my-page-order page is display, but however my solution is not good (because of hard inluding the scripts) and just a workaround until final WP 2.8 is released and you will fix it in the right way :)

  14. peterluxford
    Member
    Posted 5 years ago #

    HI, just updated to 2.8 and My Category order is no longer working. Cannot drag and drop and also the widget states there are no Categories.

    Look forward tot he new release - thanks!

  15. sahdow
    Member
    Posted 5 years ago #

    Thanks for the post. For non technical people like myself (took me a while to figure out what to do with the code) here is where to insert.

    Find: (around line 113 on mypageorder)
    <script language="JavaScript">
    jQuery("#order").sortable({
    placeholder: "ui-selected",
    revert: false,
    tolerance: "pointer"
    });

    Replace with:
    <script language="JavaScript">
    jQuery(document).ready(function(){
    jQuery("#order").sortable({
    placeholder: "ui-selected",
    revert: false,
    tolerance: "pointer"
    });
    });

  16. thunderclap82
    Member
    Posted 5 years ago #

    It still doesn't work for me sahdow.

  17. froman118
    Member
    Posted 5 years ago #

    Updated 2.8 version is available.

  18. Palmouse
    Member
    Posted 5 years ago #

    Hi froman,

    My plugin is up to date (2.8 version) but it does not work...
    Actually, before the upgrade it was working fine but it's not anymore.

    What should I do to fix this ?

  19. froman118
    Member
    Posted 5 years ago #

    Gotta give me more than "doesn't work". Are the pages not coming up as orderable? Try deleting the plugin completely using the "Delete" link on your list of plugins and reinstalling.

  20. bibflasso
    Member
    Posted 5 years ago #

    Updated the Plug-in to (2.8 version) but it does not work. We are running WordPress 2.7.1. (will not be upgrading to WP 2.8 right away) at several sites with different plug-ins installed and it stopped working at each of them after the update of the plug-in.

    Cannot drag pages. The Hover image comes up, but just "selects" the text. I uninstalled 2.8 version of plug-in and re-installed the 2.7.1 version and it is working.

    Hope that helps...

  21. cactuscarl
    Member
    Posted 5 years ago #

    bibflasso,
    I get the same problem. I'm still on WP 2.7.1 and just updated the plugin to the 2.8 version. Now it's busted :o(

  22. froman118
    Member
    Posted 5 years ago #

    I'll have to look at it over the next day or two so revert to 2.7.1 if need it. Must be something going on with the jQuery includes.

  23. Palmouse
    Member
    Posted 5 years ago #

    I am using WordPress 2.7.1 and i tried to delete the plugin and then reinstall it but the problem is the same : the drag and drop does not work, so i am not able to order the pages.

  24. Just noticed that this plugin no longer works on one of my site. I deleted it, re-installed it and still nothing.

    I made the change recommended by sahdow, but nothing.

    The Hover image comes up, but just "selects" the text. I haven't upgraded to 2.8 yet, but still using 2.7.1.

  25. RyanWilliams
    Member
    Posted 5 years ago #

    Just chiming to to say that I've had the same problem. I used the plugin's automatic upgrade on a WordPress 2.7.1 blog yesterday, and a day later got a phone call from a client wondering why it no longer worked.

    To confirm it wasn't a dodgy download, I manually downloaded 2.8 and it didn't help. Fortunately WordPress.org stores older versions, and reverting to 2.7.1 has fixed the problem.

  26. froman118
    Member
    Posted 5 years ago #

    Just posted version 2.8a, should fix the 2.7.1 problems. Let me know if it does since I don't have an older install to test on.

  27. Palmouse
    Member
    Posted 5 years ago #

    Same problem for me; I did uninstall the 2.8 version and then I have installed the 2.8a...
    I am using WP 2.7.1 and the drag and drop does not work.

  28. RyanWilliams
    Member
    Posted 5 years ago #

    Yeah, unfortunately the dragging is still broken in 2.7.1 even with 2.8a. No idea what it's like in WordPress 2.8 (can't update until all my plugins are sorted out).

  29. froman118
    Member
    Posted 5 years ago #

    Arg just saw it, line 36, should be:

    add_action('admin_menu', 'mypageorder_js_libs');

    I started messing around with the new 'admin_enqueue_script' action and never removed it. I'll get it fixed tonight.

  30. RyanWilliams
    Member
    Posted 5 years ago #

    Thanks, 2.8b seems to have fixed the problem.

    Just so you know, my clients LOVE this plugin so please be aware your work is appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic