Advertisement:

Author Topic: [NOT SOLVED] Cannot edit listing> Error 500! gum theme  (Read 382 times)

dude21

  • Newbie
  • *
  • Posts: 20
[NOT SOLVED] Cannot edit listing> Error 500! gum theme
« on: March 21, 2019, 12:48:28 pm »
OSC3.8

//---EDIT--//

The problem is not resolved. The way it is atm is the regions are set on the autocomplete in the theme admin and the frontend admin does not crash on edit ad.

If the admin is set for the Regions to dropdown the system crashes if the customer is trying to edit ad in the back end.

If no one knows how to troubleshoot this issue, Ill start to compare codes of the "post add" and "edit page" as it looks to me the "add" and "edit" and search the dropdown system is the same, so how two of them work on one doesnt..ffs..ill do it next week.

look at me... writing like a true coder... ;D

//---END OF EDIT--//

Just testing the script and some plugs out and found the user cannot edit the ad in mysite/user/items the response is 500

I have multiple countries for locations.

Debug:
PHP Notice:  Undefined index: pk_i_id in /home/user34/public_html/oc-includes/osclass/frm/Category.form.class.php on line 33
PHP Fatal error:  Allowed memory size of 270532608 bytes exhausted (tried to allocate 80 bytes) in /home/user34/public_html/oc-includes/osclass/classes/database/DBRecordsetClass.php on line 186

I followed this thread:
https://forums.osclass.org/general-help/osclass-extreme-memory-usage-with-multi-country/15/

Big thanks to contributors

***CORRECTED AGAIN***

It's a theme issue. Just seen a reference to Osclasswizards on your queries log.

Locate this in item-post:

Code: [Select]
ItemForm::city_select(osc_get_cities(),osc_user());
an replace with:

Code: [Select]
ItemForm::city_select(osc_get_cities(osc_user_region_id()), osc_user());
That seems to be working all right with no loading of all cities anymore.

Regards

but my item-post.php already contains both lines of the suggested fix :-\

<?php if (gum_default_location_show_as() == 'dropdown') {
                                if(Params::getParam('action') != 'item_edit') {
                                    GumItemForm::city_select(null, osc_user());
                                } else { // add new item
                                    GumItemForm::city_select(osc_get_cities(osc_user_region_id()), osc_user());
                                }
                            } else {
                                GumItemForm::city_text(osc_user());
                            } ?>

Does anyone know how to be with this problem? memory limit is set 256.
« Last Edit: April 05, 2019, 11:39:19 pm by dude21 »

dude21

  • Newbie
  • *
  • Posts: 20
Re: Cannot edit listing> Error 500
« Reply #1 on: March 24, 2019, 12:51:31 pm »
Any thoughts???

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2132
  • osclass.work
Re: Cannot edit listing> Error 500
« Reply #2 on: March 25, 2019, 02:15:51 am »
Enable debugging and check if you have anything. See documentation on main site how.

dude21

  • Newbie
  • *
  • Posts: 20
Re: Cannot edit listing> Error 500
« Reply #3 on: March 25, 2019, 10:33:53 am »
Enable debugging and check if you have anything. See documentation on main site how.

The above errors are from debugger.

I got like a few hundred rows of similar to this, all of this is related to the location:

[country/paris] PHP Fatal error:  Allowed memory size of 270532608 bytes exhausted (tried to allocate 80 bytes) in /home/user34/public_html/oc-includes/osclass/classes/database/DBRecordsetClass.php on line 186


dude21

  • Newbie
  • *
  • Posts: 20
Re: Cannot edit listing> Error 500
« Reply #4 on: March 25, 2019, 11:40:05 am »
The error codes attached.


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2132
  • osclass.work
Re: Cannot edit listing> Error 500
« Reply #5 on: March 26, 2019, 11:58:35 pm »
Does it happen with Bender theme?

I see some fatal errors from missing functions / removed plugins. In any case, you have issues that needs to be solved. Some issues with database server, which can happen because your server is overloaded, bad hosting, the usual stuff.

dude21

  • Newbie
  • *
  • Posts: 20
Re: Cannot edit listing> Error 500
« Reply #6 on: March 27, 2019, 11:15:06 pm »
Does it happen with Bender theme?

I see some fatal errors from missing functions / removed plugins. In any case, you have issues that needs to be solved. Some issues with database server, which can happen because your server is overloaded, bad hosting, the usual stuff.

dev101 the Bender theme works but the Gum does not, thats why I posted under ....well themes.....

Yeah there are some plugin and few other errors but this problem comes in my opinion from Undefined index: pk_i_id in /home/yefpldvs9qff/public_html/oc-includes/osclass/frm/Category.form.class.php on line 33

this is the line 33 if anyone has different pls let me know:
echo '<option value="' . $c['pk_i_id'] . '"' . ( ($category['pk_i_id'] == $c['pk_i_id']) ? 'selected="selected"' : '' ) . '>' . $c['s_name'] . '</option>';



what does the above relates to if anyone knows?



dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2132
  • osclass.work
Re: Cannot edit listing> Error 500
« Reply #7 on: March 27, 2019, 11:20:36 pm »
While abnormal condition, the notice you mentioned is definitely not causing fatal errors. Is your Gum theme modified? Reverse all changes and try again. Disable all plugins as well.

dude21

  • Newbie
  • *
  • Posts: 20
Re: Cannot edit listing> Error 500
« Reply #8 on: March 28, 2019, 03:12:29 am »
thanks for getting back to me dev101.

I have disabled all the plugins and every time same issue.

Eventually got the page working after setting the search page dropdown to autocomplete in the theme admin.

sorry for the fuss.

Does it happen with Bender theme?

I see some fatal errors from missing functions / removed plugins. In any case, you have issues that needs to be solved. Some issues with database server, which can happen because your server is overloaded, bad hosting, the usual stuff.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2132
  • osclass.work
Re: [SOLVED] Cannot edit listing> Error 500
« Reply #9 on: March 28, 2019, 03:24:32 am »
Well, not sure what's happening, could be a theme bug, maybe developer can help you solve it.

Regards

dude21

  • Newbie
  • *
  • Posts: 20
Re: [NOT SOLVED] Cannot edit listing> Error 500! gum theme
« Reply #10 on: April 15, 2019, 12:43:59 pm »
Still outstanding job this is...

Cannot edit the ad in the user admin > error 500

Theme settings>listing add/edit>show location input as AUTOCOMPLETE and it works
Theme setitngs>listing add/edit>show location input as DROPDOWN and page isnt working/ http error 500

Does anyone have same problem?

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2132
  • osclass.work
Re: Cannot edit listing> Error 500
« Reply #11 on: April 15, 2019, 01:03:46 pm »
Is your Gum theme modified? Reverse all THEME hanges and try again.

Try this, as something you did makes it stop working. Unzip from original archive and overwrite your old files (make a backup of them).

dude21

  • Newbie
  • *
  • Posts: 20
Re: [NOT SOLVED] Cannot edit listing> Error 500! gum theme
« Reply #12 on: April 15, 2019, 01:53:44 pm »
Is your Gum theme modified? Reverse all THEME hanges and try again.

Try this, as something you did makes it stop working. Unzip from original archive and overwrite your old files (make a backup of them).

Thanks BritWeb, my theme is not modified at all, only added some plugins from same developer.

As per your suggestion and my findings on cp sql database size, this cms seems to save everything in the DB and not files and thus you suggest that overwriting files would not cause any problems as long as not modified and not updated....


Yeah Ill try this over the coming few days and let you all know of the outcome.