CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Limited countries in localization
Pages: [1]

Author Topic: Limited countries in localization  (Read 930 times)

cantsin

  • Guest
Limited countries in localization
July 13, 2009, 05:05:44 pm
Basically, there are a limited number of countries I can pick. I can select all but 55 countries.

I found a previous thread about this topic here:

http://forum.civicrm.org/index.php?topic=8068.0

My problems are similar, but a bit different. We run 2.2.7. And it's definitely not a php error (nothing shows up on the logs, limit is set to 256M).

What's different is that, with this problem, I cannot select *any* of the available states and provinces, even if I de-select countries. But the states/provinces show up just fine in country/state dropdowns.

I am sure that it worked just fine in 2.2.6 - in fact, all countries were selected then; it must be a database change somewhere that set off this problem. Trying a fresh copy of 2.2.7 works just fine, but unfortunately this is an already-existing production installation. Any ideas on where I can go from here to figure out this problem?

cantsin

  • Guest
Re: Limited countries in localization
July 13, 2009, 05:56:26 pm
OK, in CRM/Admin/Form/Setting/Localization.php::postProcess, I printed out the countryLimit values - only 188 countries (out of 245) are returned, even though all countries were selected. It does seem to be a php issue after all.

Not sure where to go from this point. I also can't figure out where such a php limit would exist. I guess I could add them all manually as a workaround, but I'd like to know the root of this problem.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Limited countries in localization
July 13, 2009, 08:08:34 pm

1. can u reproduce this issue on the demo server (i could not on the demo server, it allowed me to select all)

2. can u print $_POST and see what the contents are

3. we use a pear html element called advmultiselect. if i had to guess there might be a bug in there: packages/HTML/QuickForm/advmultiselect.php. you might want to add debugging code to that file and see if u can get more information/clues

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

cantsin

  • Guest
Re: Limited countries in localization
July 20, 2009, 09:55:28 am
1. Can't reproduce on demo server.

2. POST:

Quote
Array
(
    [qfKey] => 03e4e0e399e5dac321707a14a4e55200
    [_qf_default] => Localization:next
    [lcMessages] => en_US
    [defaultCurrency] => USD
    [lcMonetary] => en_US
    [moneyformat] => %c %a
    [moneyvalueformat] => %!i
    [customTranslateFunction] =>
    [legacyEncoding] => Windows-1252
    [fieldSeparator] => ,
    [defaultContactCountry] => 1228
    [countryLimit] => Array
        (
           
  • => 1228
  • [1] => 1002
                [2] => 1003
                [3] => 1004
                [4] => 1005
                [5] => 1006
                [6] => 1007
                [7] => 1008
                [8] => 1009
                [9] => 1010
                [10] => 1011
                [11] => 1012
                [12] => 1013
                [13] => 1014
                [14] => 1212
                [15] => 1016
                [16] => 1017
                [17] => 1018
                [18] => 1019
                [19] => 1020
                [20] => 1021
                [21] => 1022
                [22] => 1023
                [23] => 1025
                [24] => 1026
                [25] => 1027
                [26] => 1028
                [27] => 1029
                [28] => 1030
                [29] => 1032
                [30] => 1033
                [31] => 1034
                [32] => 1036
                [33] => 1037
                [34] => 1038
                [35] => 1039
                [36] => 1040
                [37] => 1041
                [38] => 1042
                [39] => 1043
                [40] => 1044
                [41] => 1045
                [42] => 1046
                [43] => 1047
                [44] => 1048
                [45] => 1049
                [46] => 1051
                [47] => 1050
                [48] => 1052
                [49] => 1053
                [50] => 1055
                [51] => 1056
                [52] => 1057
                [53] => 1058
                [54] => 1054
                [55] => 1059
                [56] => 1060
                [57] => 1061
                [58] => 1062
                [59] => 1064
                [60] => 1065
                [61] => 1066
                [62] => 1067
                [63] => 1068
                [64] => 1069
                [65] => 1070
                [66] => 1072
                [67] => 1073
                [68] => 1074
                [69] => 1075
                [70] => 1076
                [71] => 1077
                [72] => 1078
                [73] => 1079
                [74] => 1080
                [75] => 1213
                [76] => 1081
                [77] => 1082
                [78] => 1083
                [79] => 1084
                [80] => 1085
                [81] => 1086
                [82] => 1087
                [83] => 1088
                [84] => 1089
                [85] => 1090
                [86] => 1245
                [87] => 1091
                [88] => 1092
                [89] => 1093
                [90] => 1094
                [91] => 1095
                [92] => 1096
                [93] => 1097
                [94] => 1098
                [95] => 1099
                [96] => 1100
                [97] => 1101
                [98] => 1102
                [99] => 1103
                [100] => 1104
                [101] => 1105
                [102] => 1106
                [103] => 1107
                [104] => 1108
                [105] => 1109
                [106] => 1244
                [107] => 1110
                [108] => 1111
                [109] => 1112
                [110] => 1113
                [111] => 1114
                [112] => 1115
                [113] => 1116
                [114] => 1117
                [115] => 1118
                [116] => 1119
                [117] => 1120
                [118] => 1121
                [119] => 1122
                [120] => 1123
                [121] => 1124
                [122] => 1125
                [123] => 1126
                [124] => 1127
                [125] => 1128
                [126] => 1129
                [127] => 1130
                [128] => 1131
                [129] => 1132
                [130] => 1133
                [131] => 1134
                [132] => 1135
                [133] => 1136
                [134] => 1137
                [135] => 1138
                [136] => 1139
                [137] => 1140
                [138] => 1141
                [139] => 1142
                [140] => 1143
                [141] => 1144
                [142] => 1243
                [143] => 1145
                [144] => 1146
                [145] => 1147
                [146] => 1035
                [147] => 1148
                [148] => 1149
                [149] => 1150
                [150] => 1152
                [151] => 1151
                [152] => 1153
                [153] => 1154
                [154] => 1155
                [155] => 1156
                [156] => 1157
                [157] => 1158
                [158] => 1159
                [159] => 1160
                [160] => 1161
                [161] => 1162
                [162] => 1163
                [163] => 1164
                [164] => 1165
                [165] => 1166
                [166] => 1167
                [167] => 1168
                [168] => 1169
                [169] => 1170
                [170] => 1171
                [171] => 1172
                [172] => 1173
                [173] => 1174
                [174] => 1175
                [175] => 1179
                [176] => 1176
                [177] => 1177
                [178] => 1178
                [179] => 1180
                [180] => 1181
                [181] => 1182
                [182] => 1183
                [183] => 1184
                [184] => 1185
                [185] => 1186
                [186] => 1207
                [187] => 1187
                [188] => 1001
            )

    )
Looks like the bug happens before POST?

3. Tried messing around with advmultiselect.php. I couldn't find anything obvious.

4. Doing: update civicrm_domain set config_backend = NULL; seems to resolve this issue. I can add all the countries, no problem. If I do this on a production server, what would the side effects be, if any? I know the localization stuff is mixed in with other stuff? I can't figure out which other settings though.

Thanks for your help!

cantsin

  • Guest
Re: Limited countries in localization
August 17, 2009, 01:55:30 pm
Finally fixed this. Posting the answer so others won't run into the same problem I did.

It was a PHP configuration issue, after all.

The fix is to increase the number of POST variables:

php.ini:
suhosin.post.max_vars = 600
suhosin.request.max_vars = 600

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Limited countries in localization

This forum was archived on 2017-11-26.