Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    Quote Originally Posted by vasilt View Post
    In it is indeed the file coutries.php. Sorry about the confusion.

    It is very confusing that the value of $_GET['page'] is correct before the execution of the initial line#8
    Code:
    require 'includes/application_top.php';
    and it is an empty string only for the alternative alphabet after that.
    Again, because the data for those other country names in the database are not utf-8ish. By that I mean they are neither utf-8 nor utf-8mb4, which are the two encodings typically used now by zen Cart.

    As previously stated, these could be updated through one or more sql statements. Either the errant entries get converted or a separate query is run to update the data in the database with utf-8ish entry. This can be done via tools, install sql patches.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #12
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,682
    Plugin Contributions
    9

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    Quote Originally Posted by mc12345678 View Post
    Again, because the data for those other country names in the database are not utf-8ish. By that I mean they are neither utf-8 nor utf-8mb4, which are the two encodings typically used now by zen Cart.

    As previously stated, these could be updated through one or more sql statements. Either the errant entries get converted or a separate query is run to update the data in the database with utf-8ish entry. This can be done via tools, install sql patches.
    personally i was never a fan of this letter pagination idea.

    that said, props to @mc12345678 for figuring this bug out.

    i would also look at the zones page as i think if the encoding is wrong, that page may not work as well.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  3. #13
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    Quote Originally Posted by mc12345678 View Post
    Again, because the data for those other country names in the database are not utf-8ish. By that I mean they are neither utf-8 nor utf-8mb4, which are the two encodings typically used now by zen Cart.

    As previously stated, these could be updated through one or more sql statements. Either the errant entries get converted or a separate query is run to update the data in the database with utf-8ish entry. This can be done via tools, install sql patches.
    And I'm willing to offer more specific assistance; however, need more details about what capabilities you have available, what data is known about the problem country names, what language is involved, etc...

    My thought on the "replacement" style query, in absence of detailed database data and if there is only one other language, then the query could do a substitution of the countries_name record for the country that has the same countries_iso_code_3 but is not the english equivalent. E.g.:

    Code:
    UPDATE countries SET countries_name = 'FOREIGN COUNTRY NEW NAME' WHERE countries_iso_code_3 = 'XYZ' AND countries_name != 'ENGLISH NAME OF COUNTRY';
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #14
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,672
    Plugin Contributions
    123

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    If the consensus is that countries.php line 11 is a bug (or needs additional logic such as a notifier), please PR. Thanks!
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #15
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    Quote Originally Posted by vasilt View Post
    In it is indeed the file coutries.php. Sorry about the confusion.

    It is very confusing that the value of $_GET['page'] is correct before the execution of the initial line#8
    Code:
    require 'includes/application_top.php';
    and it is an empty string only for the alternative alphabet after that.
    Quote Originally Posted by swguy View Post
    If the consensus is that countries.php line 11 is a bug (or needs additional logic such as a notifier), please PR. Thanks!
    Based on the report of the above investigation, line 11 in admin/countries.php does not appear to be the issue but rather sanitization executed within admin/includes/application_top.php.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #16
    Join Date
    Jan 2006
    Posts
    39
    Plugin Contributions
    1

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    As pointed out by mc12345678, the problem is in the sanitization within admin/includes/application_top.php. When I revert the value of $_GET['page'] back to its original value after the sanitization, everithing works as expected. The table "countries" is utf8 and the column "countries_name" is utf8. I converted the column to BLOB and checked the hex values. They correspond to utf-8. For example the hex code for Zimbabwe in English is: 5A 69 6D 62 61 62 77 65 and in Bulgarian is: D0 97 D0 B8 D0 BC D0 B1 D0 B0 D0 B1 D0 B2 D0 B5. This is exactly the the value of the BLOB field.

  7. #17
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    Quote Originally Posted by vasilt View Post
    As pointed out by mc12345678, the problem is in the sanitization within admin/includes/application_top.php. When I revert the value of $_GET['page'] back to its original value after the sanitization, everithing works as expected. The table "countries" is utf8 and the column "countries_name" is utf8. I converted the column to BLOB and checked the hex values. They correspond to utf-8. For example the hex code for Zimbabwe in English is: 5A 69 6D 62 61 62 77 65 and in Bulgarian is: D0 97 D0 B8 D0 BC D0 B1 D0 B0 D0 B1 D0 B2 D0 B5. This is exactly the the value of the BLOB field.
    Actually, you've just done the first step of what may resolve your issue. You've converted a nonbinary datatype to a binary datatype. Next would be to convert that column back to the utf-8ish datatype expected for the column... would expect the issue to be resolved for this problem.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #18
    Join Date
    Jan 2006
    Posts
    39
    Plugin Contributions
    1

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    I explicitly changed the encoding of the "countries_name" field of the "countries" table by applying the following two statements in phpMyadmin:
    ALTER TABLE countries MODIFY countries_name BLOB
    ALTER TABLE countries MODIFY countries_name VARCHAR(64) CHARACTER SET utf8
    and this didn't solve the problem

  9. #19
    Join Date
    Jan 2006
    Posts
    39
    Plugin Contributions
    1

    Default Re: Paginate by Letter issue of Countries list in Multilingual Admin

    I found a solution though I am not sure if it compromises site security. The file is admin/includes/classes/AdminRequestSanitizer.php and the line is 343. If the regular expression is modified to include the characters of the alternative alphabet, letter pagination works as expected.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Can't seem to paginate subcategories page
    By jmsnyder23 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 24 Oct 2014, 01:28 PM
  2. why my custom countries iso code only show one letter?
    By bear1728 in forum General Questions
    Replies: 1
    Last Post: 19 Jun 2010, 04:05 AM
  3. AustPost v2.1.3 large letter issue
    By cherylam1103 in forum Addon Shipping Modules
    Replies: 3
    Last Post: 4 Sep 2009, 01:50 PM
  4. Multilingual ezpages translation issue
    By pcontente in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 30 Jan 2009, 05:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR