Jump to content


Photo

Sort problem

sort mysql

  • Please log in to reply
4 replies to this topic

#1 nikola

nikola

    Sr. Member

  • Members
  • PipPipPipPip
  • 224 posts
  • 81

  • LocationZagreb, Croatia

Posted 16 July 2012 - 09:06 AM

I have a problem with sorting in templates.

On my local machine I have IIS with MySQL 5.5.8 and everything works fine (sorting children in admin based on global fields and custom fields (name, title, ...).

On my VPS that has MySQL 5.0.95 installed sorting doesn't work at all.

I've tried it on another dedicated server that has MySQL 5.1.63 installed and it doesn't work either.

Could it be the problem with that version of MySQL's?

Sorting in template code (PHP) works fine.

Also, I can rearrange children (although sort has been set) and no warning window pops out. On my local machine I get warning that I can't manually rearrange children bacause sorting was set with some particular field.

I read this topic and there was sort problem with MySQL 5.0.51.

I've installed new PW install on my VPS to confirm that it doesn't have anything to do with project I'm working on, and the sort problem persists.
Check out my ProcessWire admin themes: Futura Remixed Admin Theme / Moderna Admin Theme / Futura Admin Theme

#2 ryan

ryan

    Hero Member

  • Administrators
  • 5,773 posts
  • 3118

  • LocationAtlanta, GA

Posted 16 July 2012 - 11:22 AM

Where are your sort settings defined? On the parent page(s) or with the template?

I think we do have a bug when sort settings are defined with the template. I noticed when I imported a profile the other day, the sort settings in the template were still there, but somehow not having an effect. Somehow the process of exporting/importing causes template-based sort settings to get lost, but I haven't figured out why yet. So this is something I'm working on and hope to have a fix for soon. But I'm not positive if this is the same issue you are running into or not?

#3 nikola

nikola

    Sr. Member

  • Members
  • PipPipPipPip
  • 224 posts
  • 81

  • LocationZagreb, Croatia

Posted 16 July 2012 - 11:44 AM

Sort settings are defined within template.

I've installed fresh copy of PW on VPS server (running Linux/MySQL) and sort settings weren't applied.

Then I've made sql dump, copied same installation to my home dev machine (using IIS/MySQL, same as at work) and sort settings worked. Then I've installed MySQL 5.1.63 on my dev machine to test it out and it also worked.

There seems to be bug somewhere with sortfields... so I think it's the same situation that you have, only I don't understand why is it working with IIS and MySQL...strange.
Check out my ProcessWire admin themes: Futura Remixed Admin Theme / Moderna Admin Theme / Futura Admin Theme

#4 ryan

ryan

    Hero Member

  • Administrators
  • 5,773 posts
  • 3118

  • LocationAtlanta, GA

Posted 17 July 2012 - 09:32 AM

That is strange, sounds like the MySQL version might play into it somehow. Well, I hope to have this one figured out soon.

#5 nikola

nikola

    Sr. Member

  • Members
  • PipPipPipPip
  • 224 posts
  • 81

  • LocationZagreb, Croatia

Posted 18 July 2012 - 12:01 AM

That might be it, but it's strange to me that it works normally on IIS with various MySQL version installed, but on Linux with various MySQL version installed it doesn't.

Hope you'll find a quick fix soon :)
Check out my ProcessWire admin themes: Futura Remixed Admin Theme / Moderna Admin Theme / Futura Admin Theme





Also tagged with one or more of these keywords: sort, mysql

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users