Can't update any places
This topic contains 10 replies, has 2 voices, and was last updated by boxportable 10 years, 4 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
November 25, 2014 at 3:45 pm #22561
Can’t update any of my places and the error log is spammed to death with these:
PHP Warning: array_unique() expects parameter 1 to be array, null given in /var/www/vhosts/visitfraserburgh.com/httpdocs/wp-content/plugins/geodirectory/geodirectory-widgets/listing_map_widget.php
Tried modifying that file to avoid any of those errors to check if its set etc etc but it makes no difference.
I have made several changes to the core so would like to avoid updating if possible.
Will private reply with FTP / Login info.
November 25, 2014 at 3:48 pm #22562This reply has been marked as private.November 25, 2014 at 6:20 pm #22586hi,
because it is not an error but a warning and it doesn’t prevent the application from working, adding :
error_reporting(E_ERROR);
In your functions.php files will prevent any of these warnings from GD or any other plugin to ever appear on your front end (which is strongly recommended anyway).
Customizing the core plugin is a very bad idea. You will basically lock out yourself from getting any of the new things we are about to release.
I would definitely reconsider it.
Thx
Thank you
November 26, 2014 at 8:34 am #22629Customizing the core plugin is a very bad idea. You will basically lock out yourself from getting any of the new things we are about to release.
Well aware of this but I needed some stuff changing with the core and having to request what hook did what each time or adding custom HTML fields in to the listing settings via a function someone provided didn’t work we wanted it to.
So we were left with no other option, and to be honest once this website is done we wont be updating geodirectory unless forced to.
Anyway I will remove those warnings but if it is just a warning I doubt its going to fix the issue were having, thanks though.
November 26, 2014 at 8:38 am #22630Didn’t fix the problem with updating listings, I also removed some recently added script were using to show hide fields depending on category and listing type (basic/enhanced) but that also made no difference so I guess I will do some more digging :S
November 26, 2014 at 8:51 am #22631Also that warning is still being thrown after setting it not to display warnings so not sure if its being overridden somewhere else now.
November 26, 2014 at 8:57 am #22632Can anyone tell me what show_listing_widget_map() is supposed to do and why its called every page load and every time you update a listing?
The map within listings seems to function fine and display as normal so not sure why its always throwing these errors and why $list_map_json is always an empty variable.
November 26, 2014 at 9:54 am #22639Ok disabled all the calling of that widget it made no difference to saving listings so it must be something else causing the issue.
EDIT: OK this seems to be specific to Geodirectory fields because I can update the description of a listing just none of the geodirectory fields.
November 26, 2014 at 10:32 am #22644would edit but the link seems to have expired.
It doesn’t seem to be any conflict with plugins I just tested disabling them one by one.
the website was recently moved from a sub directory called /build/ but I don’t see why that would effect this :/
Can anyone tell me the function(s) used by the plugin which handle the saving of the geodirectory fields as this seems to be the actual issue rather than normal post fields like description.
EDIT:
Look like I got something, when logging the info of save post I got this in the log file which wasn’t appearing anywhere else:
<b>Notice</b>: Undefined index: geodir_post_addinfo_noncename in <b>/var/www/vhosts/visitfraserburgh.com/httpdocs/wp-content/plugins/geodirectory/geodirectory-admin/admin_functions.php</b> on line <b>922</b><br />
November 26, 2014 at 11:01 am #22647sort of made progress on a fix for this but its odd because only some feilds are updating things like check boxes don’t seem to want to.
It seems that I needed to uncomment the bit in Admin_hooks_actions.php as follows:
// no need of this box as all fields moved to main informain box add_meta_box( 'geodir_post_addinfo', $post_typename. ' ' .__('Additional Information' , GEODIRECTORY_TEXTDOMAIN), 'geodir_post_addinfo_setting', $geodir_posttype,'normal', 'high' );
It seems for some reason this is needed on mine not sure why though but its still not fully resolved my issue for all field types.
November 26, 2014 at 11:09 am #22648Right I just double checked and the latest the bit in Admin_functions.php is actually commented out for the error I was getting so I must of had something like an auto sync of local files screwing everything up.
You can mark this topic as resolved it only took 3 hours or more of faffing 😀
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket