Closed blsn closed 11 years ago
If it doesn't already, perhaps have an overlay, "Saving..." and show one of those animated loading.gifs to show the user something is happening, just taking a little longer than expected.
Hi blsn,
Could I take a look at your site? Does ALL the cities appear on the dropdown or only the ones of the selected category?
Thanks
Hi,
Answer: cities appear on the dropdown are only the ones of the selected region, same for regions which appears only for the match country.
Because of the described problem, I have put my original domain name parked till I’ll find a solution and meanwhile I’m working only on my testing server.
The following web address is temporary available for you to get the idea of the mentioned ‘freezing’ problem:
NEW: Just after uploading my files to show you the problem, I have faced with another issue.
When a user updates the item, I get an error message as follows (see the attached picture):
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 262144 bytes) in /home/a8798818/public_html/oc-includes/osclass/frm/Form.form.class.php on line 27
Country and Region appears in the dropdown box, but City is not.
It might be because the program is storing something very huge (‘city’) in some variable or selecting a lot of data from mySQL table.
p.s.
In order to show dropdown box for Region and City in item-edit.php, I’ve followed this link:
“Changing between drop-down and autocomplete for locations”
http://doc.osclass.org/Changing_between_drop-down_and_autocomplete_for_locations
and also I’ve changed as follows:
item-edit.php, from:
<?php ItemForm::region_text() ; ?>
...
<?php ItemForm::city_text() ; ?>
to:
<?php ItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
...
<?php ItemForm::city_select(osc_get_cities(osc_user_region()), osc_user()) ; ?>
Hope to hear from you,
Thank you in advance,
Mike
From: _CONEJO [mailto:notifications@github.com] Sent: Monday, November 26, 2012 7:24 AM To: osclass/Osclass Cc: blsn Subject: Re: [Osclass] Freeze page when ‘Update your item’ (#541)
Hi blsn,
Could I take a look at your site? Does ALL the cities appear on the dropdown or only the ones of the selected category?
Thanks
— Reply to this email directly or view it on GitHub https://github.com/osclass/Osclass/issues/541#issuecomment-10713533 .
Description: Description: https://github.com/notifications/beacon/Jshd8sI44GVrKZBvymxqKCLm5giyf94Cs1Uo_js0pt1WvwhPAmv6QUUGsyAXWcV4.gif
Hi,
UPDATE: After sending you my email, I’ve tried to find a solution for the error message, and I found. I fixed the error message (“Allowed memory size of 67108864 bytes exhausted…”) by adding .htaccess file to increase the memory limit.
So now in ‘Update your listing’ - all three Location fields appear (country, region and city!), and the main problem stay is that the page is uploaded well, but very slow!
Looking forward to get your advise, Thanks, Mike
Please, send my your themes files to desteban@osclass.org
The problem is NOT solved, it's running slow because it's filling the memory with something it shouldn't, that why the error appear, if you increase the memory limit, it will still take that amount of memory, it will not generate an error, but it's taking so much memory (it should not do it). Probably something is inside some loop incorrectly and is generating all this mess.
In case you are not comfortable with sending me your theme files, please, check again you made the correct changes in the correct files (it should work, but I didn't test them in Osclass 3.x versions) .
Thanks
Please find the attached theme.
I’ve checked again and I’ve made the correct changes in the correct files.
Reminder:
This is a fresh installation, without any ‘theme’ or ‘plugin’ installed.
Two country files from geo.osclass.org/downloads have been imported to sql ('United States' and 'Canada').
In order to show dropdown boxes for Region and City in item-edit.php, I’ve followed this link: http://doc.osclass.org/Changing_between_drop-down_and_autocomplete_for_locations
Also, I’ve changed as follows in item-edit.php,
from:
<?php ItemForm::region_text() ; ?>
...
<?php ItemForm::city_text() ; ?>
to:
<?php ItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
...
<?php ItemForm::city_select(osc_get_cities(osc_user_region()), osc_user()) ; ?>
More related information:
I did exactly the same installation with another hosting provider- iPage (signed up with their standard plan), their conclusion was that I’m executing an average of "91170" queries per hour which has exceeded the MySQL limits (finally they suspend my account).
Please see the following link which I’ve posted in osclass forum:
http://forums.osclass.org/general-help/terms-of-service-violation/
Thank you for your assistance,
From: _CONEJO [mailto:notifications@github.com] Sent: Monday, November 26, 2012 2:04 PM To: osclass/Osclass Cc: blsn Subject: Re: [Osclass] Freeze page when ‘Update your item’ (#541)
Please, send my your themes files to desteban@osclass.org
The problem is NOT solved, it's running slow because it's filling the memory with something it shouldn't, that why the error appear, if you increase the memory limit, it will still take that amount of memory, it will not generate an error, but it's taking so much memory (it should not do it). Probably something is inside some loop incorrectly and is generating all this mess.
In case you are not comfortable with sending me your theme files, please, check again you made the correct changes in the correct files (it should work, but I didn't test them in Osclass 3.x versions) .
Thanks
— Reply to this email directly or view it on GitHub https://github.com/osclass/Osclass/issues/541#issuecomment-10728819 .
Hi blsn,
I didn't find anything wrong. Please, add this in config.php
define('OSC_DEBUG_DB', true); define('OSC_DEBUG', true); //define('OSC_DEBUG_LOG', true);
Then, try again, at the of the page should appear all the SQL debugged, please, paste the SQL queries here (or send them to my email) so I could take a look at them.
Hi,
Please find the attached file as requested.
regards,
Mike
From: _CONEJO [mailto:notifications@github.com] Sent: Tuesday, November 27, 2012 2:01 AM To: osclass/Osclass Cc: blsn Subject: Re: [Osclass] Freeze page when ‘Update your item’ (#541)
Hi blsn,
I didn't find anything wrong. Please, add this in config.php
define('OSC_DEBUG_DB', true); define('OSC_DEBUG', true); //define('OSC_DEBUG_LOG', true);
Then, try again, at the of the page should appear all the SQL debugged, please, paste the SQL queries here (or send them to my email) so I could take a look at them.
— Reply to this email directly or view it on GitHub https://github.com/osclass/Osclass/issues/541#issuecomment-10748107 .
Description: https://github.com/notifications/beacon/Jshd8sI44GVrKZBvymxqKCLm5giyf94Cs1Uo_js0pt1WvwhPAmv6QUUGsyAXWcV4.gif
Correction:
I said before “Cities appear on the dropdown are only the ones of the selected region, same for regions which appears only for the match country. “
I see that this is correct only when the user ‘update an item’ start from ‘Country’ and change it (i.e. if USA presents and he change it to Canada, and the opposite)
Otherwise, the dropdown box of ‘Region’ contains all regions from USA and Canada same for ‘City’ (with huge number of cities).
Sent: Tuesday, November 27, 2012 6:15 AM To: 'osclass/Osclass' Cc: desteban@osclass.org Subject: RE: [Osclass] Freeze page when ‘Update your item’ (#541)
Hi,
Please find the attached file as requested.
regards,
Mike
From: _CONEJO [mailto:notifications@github.com] Sent: Tuesday, November 27, 2012 2:01 AM To: osclass/Osclass Cc: blsn Subject: Re: [Osclass] Freeze page when ‘Update your item’ (#541)
Hi blsn,
I didn't find anything wrong. Please, add this in config.php
define('OSC_DEBUG_DB', true); define('OSC_DEBUG', true); //define('OSC_DEBUG_LOG', true);
Then, try again, at the of the page should appear all the SQL debugged, please, paste the SQL queries here (or send them to my email) so I could take a look at them.
— Reply to this email directly or view it on GitHub https://github.com/osclass/Osclass/issues/541#issuecomment-10748107 .
Description: https://github.com/notifications/beacon/Jshd8sI44GVrKZBvymxqKCLm5giyf94Cs1Uo_js0pt1WvwhPAmv6QUUGsyAXWcV4.gif
Hi,
I created an account on your website but didn't receive any email, could you active my account? Thanks
From what I see of the DEBUG_SQL is that the SQL is running fine ( Database queries (Total queries: 26 - Total queries time: 0.017246723175) so it took 0.017seconds only!
Also it works fine on publish new item, but as I said, I couldn't test in edit item since I didn't receive the email to confirm my account.
Thanks
Your account has been activated.
p.s.
I have no idea why admin has to do that, and why an activation email has not been sent to you automatically.
Thanks,
Mike
From: _CONEJO [mailto:notifications@github.com] Sent: Tuesday, November 27, 2012 6:43 AM To: osclass/Osclass Cc: blsn Subject: Re: [Osclass] Freeze page when ‘Update your item’ (#541)
Hi,
I created an account on your website but didn't receive any email, could you active my account? Thanks
From what I see of the DEBUG_SQL is that the SQL is running fine ( Database queries (Total queries: 26 - Total queries time: 0.017246723175) so it took 0.017seconds only!
Also it works fine on publish new item, but as I said, I couldn't test in edit item since I didn't receive the email to confirm my account.
Thanks
— Reply to this email directly or view it on GitHub https://github.com/osclass/Osclass/issues/541#issuecomment-10754845 .
As mentioned, it’s activated, but please check your ‘spam’ folder as well.
@ _CONEJO,
Hi,
I sent you several emails but I didn’t receive any feedback from you.
Please advise if you’re still working on this matter.
Thanks,
From: _CONEJO [mailto:notifications@github.com] Sent: Tuesday, November 27, 2012 6:43 AM To: osclass/Osclass Cc: blsn Subject: Re: [Osclass] Freeze page when ‘Update your item’ (#541)
Hi,
I created an account on your website but didn't receive any email, could you active my account? Thanks
From what I see of the DEBUG_SQL is that the SQL is running fine ( Database queries (Total queries: 26 - Total queries time: 0.017246723175) so it took 0.017seconds only!
Also it works fine on publish new item, but as I said, I couldn't test in edit item since I didn't receive the email to confirm my account.
Thanks
— Reply to this email directly or view it on GitHub https://github.com/osclass/Osclass/issues/541#issuecomment-10754845 .
Hi, yes, I'm working on it. Will update once I got some news. Thanks
Hi,
In your item.edit.php, you have this :
<div class="row">
<label><?php _e('Region', 'modern'); ?></label>
<?php ItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
</div>
<div class="row">
<label><?php _e('City', 'modern'); ?></label>
<?php ItemForm::city_select(osc_get_cities(osc_user_region()), osc_user()) ; ?>
</div>
Where it should be :+1:
<div class="row">
<label><?php _e('City', 'modern'); ?></label>
<?php ItemForm::city_select() ; ?>
</div>
I'm pretty sure is that, but maybe there's something else. http://doc.osclass.org/Changing_between_drop-down_and_autocomplete_for_locations
Your web link above (or your code suggestion replacement) doesn’t provide dropdown boxes for ‘Region’ and ‘City’ in ‘Update an item’. It will load this page faster, but the user can enter any data in these two boxes when he updates the item. This is of course not good because it creates more unnecessary cities/regions in the database, and the affect is actually wrong searching results by ‘Location’.
I've summarized again the problem:
1) The page ‘Update an item’ with DROPDOWN Boxes of ‘Region’ and ‘City’ is loaded very slow (‘modern’ or ‘twitter’ theme).
2) When a user ‘Update an item’ presses in the DROPDOWN Box on ‘City’ (or ’Region’), a list of all cities from the two countries mixed together appears (instead cities under region, and regions under country). The amount of cities in USA and Canada database is huge (more than 75,000 cities all together appears in the dropdown list).
I’ve posted more related information about this matter in the following link: http://forums.osclass.org/general-help/help-needed-for-'location'-auto-complete-input/
Please don’t close this issue and let us know if we can solve this problem, Waiting for your kind reply, Thx.
Did you replaced the code? because you had it wrong in your theme, item-edit.php modification is different that item-post.php, you did the exact same modification and it's wrong.
Yes I did it. But when using the code as suggested by you (or the link given by you), the dropdown boxes for ‘Region’ and ‘City’ in ‘Update an item’ doesn’t appears (just a regular input text box appears).
Please read my comment above … Thx.
Then you did something wrong
In your item.edit.php, you have this :
<div class="row">
<label><?php _e('Region', 'modern'); ?></label>
<?php ItemForm::region_select(osc_get_regions(osc_user_country()), osc_user()) ; ?>
</div>
<div class="row">
<label><?php _e('City', 'modern'); ?></label>
<?php ItemForm::city_select(osc_get_cities(osc_user_region()), osc_user()) ; ?>
</div>
Where it should be :
<div class="row">
<label><?php _e('City', 'modern'); ?></label>
<?php ItemForm::city_select() ; ?>
</div>
I know that in item-edit.php, you suggest that should be:
<?php ItemForm::region_select() ; ?> ... <?php ItemForm::city_select() ; ?>
But if I use the above, there will be no dropdown boxes for ‘Region’ and ‘City’ (only regualr input text box), and this is why I’ve added in my code the functions (to get dropdown boxes):
osc_get_regions() osc_get_cities()
I tried editing your theme and it worked for me, I just run out of ideas what it could be
The problem exists, please follow the following simple steps:
The BUG is that the list of cities doesn’t match the ‘Region’. You can see that the list of cities is actually all cities from all regions and countries mixed together.
My question: Can you provide the correct PHP code for ‘item-edit.php’, so that cities in the dropdown box will match its ‘Region’?
Thx,
any idea about this? I been having the same issue, I want dropdowns, but the regions in the edit part didn't match with the cities
It takes minutes for the data to appear in ‘Update your item’.
I’m using version 3.0.2. with drop-down fields for Location (important!). Fresh installation, few listings, and I don’t have any ‘theme’ or ‘plugin’ installed. I have all regions and cities of 'United States' and 'Canada' (the sql downloaded from geo.osclass.org/downloads).
It doesn’t matter if I’m using a remote server (www.mydomain.com) or a testing server (Xampp). I’ve tested the above with different themes ('modern', 'twitter' etc'), different computers and different browsers, but still having the problem.
The problem is when a registered user edits his ads (‘Update your item’), the page is freezing and only after about 3 minutes the ‘City’ appears.
I could assume that the problem is ‘United States’ which its database contains more than 75,000 cities, but for ‘Publish an item’ the page come up fast.
I’m concern that users which getting a 'freeze' page when browsing and editing their ads, will not return to the website.
Please advise if the above is a bug in the program, can it be fixed.
Thx.