Jump to content

Drag and drop page sorting with Blog Profile not working


Barry
 Share

Recommended Posts

Since installing the Blog Profile, which is pretty awesome by the way, I've noticed I can't order any of the pages by dragging and dropping them in the admin like I'm used to. I'm guessing this has something to do with sorting the blog posts by date, but even so, after trying to change the settings of the templates and fields and pages, I can't really find anything that would seem to fix this. All pages, even those outside the blog return back to their original position after being dragged and placed in the right position. It's like the new position isn't being stored at all. Anyone have any ideas? All ideas/suggestions appreciated.

Link to comment
Share on other sites

Hi Barry,

Are you saying that you still can't reorder the posts in the admin?

I have a test version of the blog profile (latest version) running in PW 2.3 (stable). If I Edit the 'Blog Posts' page and set 'Children' > 'Children are sorted by' to 'Manual drag-n-drop' (under the 'Sort settings'), then reordering works fine for me.

However, this doesn't change the render settings for the frontend of the site (which are still rendering '-date' sort order irrespective of the order in the admin area). You can look into 'blog.inc' under the function 'renderPosts' to change this. Set 'sort=sort' instead of 'sort=-date' to ensure that the manual ordering in the admin area is respected.

  • Like 1
Link to comment
Share on other sites

I can't reorder pages outside the blog page. I have Home as the main page, under which I have the blog, page1, page2 and page3. I'm trying to order the blog as the last page, but whenever I reorder the pages, to be page2, page1, page3, blog, it doesn't get saved and after refreshing the admin, it goes back to the order I created the pages.

Link to comment
Share on other sites

Not sure about that one. Are you on a local server or production(remote)? There was a time on WAMP where  PHP MySQL library version (Client API version) differed from MySQL server version....You can check the PHP MySQL library version using phpinfo..Am not sure whether that would be an issue in this case though...Let's here what others have to say :)

Link to comment
Share on other sites

As far as I know, there was only that one old buggy version of MySQL, but that created problems for anything running in it, so it's kind of a rare thing to find it. I doubt the MySQL version is the problem in this case. What 3rd party modules are installed? What browser and version are you using? When you move a page, does it immediately return back to the original location, or only after you refresh/reload the page? Do you literally have pages named "page2", "page3", etc.? If so, you might want to consider different naming because that's the default naming of pagination URLs. 

Link to comment
Share on other sites

I'm hoping that this isn't a MySQL version issue, I'm not sure I have the ability to change this through my client's hosting provider.

The blog profile is the only module I have installed which I'm testing in Chrome v28 on OS X 10.8.3. I'm also running the latest version of ProcessWire.

After dragging the page, it lands in it's new spot as it should, but the site doesn't update and upon refreshing the admin, the page is right back where it was. The pages were named page 2 and page3 (with and without spaces) but I've renamed these to things like about us and contact, etc but the same issue persists.

Link to comment
Share on other sites

I don't know why I didn't think to test this earlier, I have another site on the same server running on ProcessWire and I just checked to see that site has the issue, and it does. This site was developed on a completely different test server with a different version of MySQL (5.1.61) and the drag and drop works fine there. Is it safe to assume this is due to the database version and not some other requirement? When installing Processwire, all the requirements were met.

Link to comment
Share on other sites

The way you describe it, it definitely sounds like something isn't working right with the database then. If you have the opportunity to upgrade, that seems like the right thing to do. 

Link to comment
Share on other sites

I haven't upgraded yet, but have learnt something new.

Changing the order of pages does nothing in Chrome or Firefox as described above. Changing the order in Chrome DOES change the order of the pages on the site in Safari. Even after refreshing the admin in Chrome to cause the original order to return, the order remains unchanged in Safari.

It only changes again after changing the order of another page in Chrome in the admin. This causes the last moved page to be in the new position and all previously moved pages to be back where they were as it is in Chrome.

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...