Jump to content

bug in processwire/page/list/ ?


qwertyeee
 Share

Recommended Posts

in admin panel processwire/page/list/

Page List

Home 7    * Edit * View * New

    Stories 1 * Edit * View * New * Move

Stories page can't load child if child page have cyrilic title.

also same table in install.sql have non utf8 charset.

Link to comment
Share on other sites

Can you post the cyrillic title that it got hung up on? (or PM or email to me if you prefer). I want to duplicate the issue locally so that I can fix it. Also, which table are you referring to install.sql?

Thanks,

Ryan

Link to comment
Share on other sites

i think any cyrilic site http://dirty.ru/ for examle you can copy same word for test title.

and none utf8 table

CREATE TABLE IF NOT EXISTS `field_headline` (

  `pages_id` int(10) unsigned NOT NULL,

  `data` text NOT NULL,

  PRIMARY KEY  (`pages_id`),

  FULLTEXT KEY `data` (`data`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `field_sidebar` (

  `pages_id` int(10) unsigned NOT NULL,

  `data` mediumtext NOT NULL,

  PRIMARY KEY  (`pages_id`),

  FULLTEXT KEY `data` (`data`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `field_summary` (

  `pages_id` int(10) unsigned NOT NULL,

  `data` mediumtext NOT NULL,

  PRIMARY KEY  (`pages_id`),

  FULLTEXT KEY `data` (`data`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

(*and sorry for my english  :) )

Link to comment
Share on other sites

There aren't supposed to be any latin1 tables, but you are right -- there were those 3 custom fields lingering from the default site profile (headline, sidebar, summary). I just updated the default install profile to make them utf8, so hopefully that will fix it on any future installations. If you need help converting existing tables to UTF8, just let me know and I can tell you how. The Fieldtype table creation function already enforces UTF8 for any newly created field tables, so hopefully no more latin1 charsets will pop up anywhere.

The only thing is that I'm not sure why it prevented the pages from loading in the page list, since none of those fields are used in generating the page list (unless you added one to the Modules > Page List config). I wasn't able to load dirty.ru (timed out), but just copied some text from a random Russian site and pasted it into the title and all seems to work. Let me know if you continue to experience the issue after changing the table's charset (or from a new install).

Thanks,

Ryan

post-1-132614277318_thumb.png

Link to comment
Share on other sites

I'm still not totally sure why this would be interfering with the Page List since it doesn't use those fields... But I'm thinking that one of them must have 'autojoin' on, and it's getting stuck during the load process. Are you able to view the page with the Russian titles on the site? (outside of the page list)

Also, how did you convert those tables to UTF-8? It may not work to just modify the table's character set. You may actually have to mysqldump them forcing latin1, then open the dump file in a UTF-8 compatible text editor (ensuring it loads it as UTF-8, no BOM), modify the 'create table' statements to replace 'latin1' with 'utf8' in the charset definition, and then re-import the tables and data. While this is easy to do, it's also kind of a pain to have to go through all those steps, so I'm sorry about that. But this has worked for me in the past, where just modifying the table's charset didn't.

Link to comment
Share on other sites

" Are you able to view the page with the Russian titles on the site? (outside of the page list)"  yes.

Also, how did you convert those tables to UTF-8? - i change it in \ryancramerdesign-ProcessWire-019560e\site-default\install\install.sql in all tables with latin charset and reinstall site.

Link to comment
Share on other sites

Is this online somewhere that I could login to it and see what it's doing?  I want to try out the page list with FireBug active to see what the ajax calls are reporting. If you want me to do that, please send me a PM with the login info. If not, then maybe I can reproduce locally with a copy of the dump file. Also, double check that you are running a recent commit, just in case you are running into a bug from an older commit. Lastly, what browser and PHP version are you using? I have seen the behavior you describe on PHP versions prior to 5.2.4.. though I'm guessing that's not the case here.

Link to comment
Share on other sites

That is interesting that the apache charset was affecting this. I did just add a $config->dbCharset option that should be set to 'utf8' on new installations (and now is by default). This ensures that PHP is talking to MySQL with utf8 even when it's not the system default. However, this is probably something you wouldn't want to enable on an existing site if it wasn't already utf8. But if you perform a new installation of ProcessWire (from the latest commit) I'd be curious to know if this helps to resolve any of the issues you experienced.

Btw, your PHP version is fine. 5.2.12 is newer than 5.2.4 (ProcessWire's minimum requirement) so you are all good with  the PHP version.

Link to comment
Share on other sites

  • 4 months later...

Can you describe in more detail: what behavior are you experiencing and can you paste in the text/label that's causing it to hang up?  Also, view your phpinfo(); and look under the "PCRE" section and let us know what it says the PCRE version is. Lastly, look in your MySQL database for the table 'field_title' and let me know if it's charset is not utf8.

Link to comment
Share on other sites

Can you paste in the exact text? I just want to try and see if I can duplicate locally. Though I was assisting someone else with Cyrillic text a couple weeks ago and everything worked well for me. It turned out that their PCRE version was from PHP 5.1 (even though their PHP version was 5.3), and didn't support Cyrillic. However, that doesn't appear to be the case for you as your PCRE appears to be up-to-date.

Link to comment
Share on other sites

Can you paste in the exact text? I just want to try and see if I can duplicate locally. Though I was assisting someone else with Cyrillic text a couple weeks ago and everything worked well for me. It turned out that their PCRE version was from PHP 5.1 (even though their PHP version was 5.3), and didn't support Cyrillic. However, that doesn't appear to be the case for you as your PCRE appears to be up-to-date.

Check your PM.

Link to comment
Share on other sites

Looks like your server is forcing a Windows-1251 charset header, overriding ProcessWire's UTF8 charset setting. Try the following:

Add this to the top of your .htaccess file:

AddDefaultCharset UTF-8

If that doesn't fix it, try adding this to the top of your /index.php file:

<?php
header('Content-type: text/html; charset=utf-8'); 

Hopefully we can override the Windows-1251 charset that the server is forcing in Apache.

Link to comment
Share on other sites

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...