Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Ajax error in WP admin
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
May 18, 2017 - 7:05 pm

Hi there, 

it seems that SimplePress is causing an error in the WP backend. 

[Image Can Not Be Found]

I have the newest WP version. I am using the WP default theme and I have no plugin installed except SP and I am trying to save custom taxonomies in a custom post type which I have registered through my functions.php. 

After adding a new taxonomy the page is not updated automatically. The taxonomy is added to the database but I have to reload the page manually before it is shown in the list of custom taxonomies. I am working on a local development server so can't give you access but it should be pretty easy to reproduce this thing. 

Warm regards,
Sebastian

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 18, 2017 - 7:11 pm

we will need more steps to reproduce... right now, I am not seeing it...

and the error message does not indicate its coming from simple press.. that is the standard ajax handler for wp...  why do you think its coming from sp???

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
May 18, 2017 - 7:27 pm

Thanks for the quickly reply!

There is a chance that the error is caused by a MU plugin that i have running here based on my copy of the installation from our staging server to my local server. I am investigating. 

The reason why I thought it must be SP is because I have no other plugin (except the WP Engine MU plugin) installed and when I deactivate SP the error is gone. 
Will get back to you shortly. 

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
May 18, 2017 - 7:41 pm

I deactivated all MU plugins as well and now the only plugin is SP!
I have tested another browser and I am having the same issue. 
In the moment I deactivate SP the Ajax feature shows the new taxonomy instantly whereas it is not updated in the interface (without a reload) if I have SP active. 

What else could be the issue if not SP?

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
May 18, 2017 - 7:45 pm

In IE 11 I am getting this error when I have SP active:

XML5635: An XML declaration is only allowed at the beginning of the file. Line: 2, Column 3

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 18, 2017 - 8:40 pm

So, I cannot replicate your IE 11 issue (took second to get it working since Edge so much nicer)...  Where are you seeing that? and what are you doing?

are you using a specific plugin for setting up your CPTs? or just manually creating the CPT?

for the 500 error generated, anything in the server error log?

if its a sp ajax request, then its likely something else firing an ajax request with the same name...

can you give me more explicit steps you do to recreate the error?

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
May 18, 2017 - 9:32 pm

Hi, 

I have created CPT through my functions.php. The setup is standard and works normally just fine. 

And I don't get the 500 error anymore. I think it was related to something else. It's a bit confusing here this morning, so I am still trying to eliminate all other possible sources of errors. 

I am just adding new custom taxonomies to my post types and it works but the page is not refreshing without reload and normally it does. In the moment I deactivate SP it works just fine - in Firefox and IE.

[Image Can Not Be Found] 

The screenshot just shows you where I am at. 
I have attached my functions.php as a txt. 

It may actually not be a purely SP related error but since it is the only plugin that is installed, it must be related to the malfunction of the WP backend. I don't know what else to say right now. I just tested on our WP Engine live server and I am having the same issue there with an earlier custom post type for events. Also there the refreshing of the taxonomy is not working and only when I reload the page the new taxonomy is showing up. 

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
May 18, 2017 - 9:34 pm

Please note: The CPT stuff is just add to the bottom of the file. The rest of the file I never touched. It's just for test purposes that I use the default theme because I wanted to make sure it is not a theme issue. 

And I do have a warning in my logs, that could be related:
PHP Warning: Invalid argument supplied for foreach() in E:\XAMPP\htdocs\bbtrs\wordpress\wp-includes\class-wp-post-type.php on line 634

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 19, 2017 - 2:08 am

confused... so the ajax error is gone?  but something still not working?

would need to see a call stack for that error as its just a wp routine... need to see who the order of functions...

I have played around with other CPT and taxonomies (we use them here) with no issue... but have not tried the code from your functions.php...  will try to this weekend and see if anything conflicting...  time short with Andy away and moving between two houses, so please bear with us....

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
May 20, 2017 - 12:24 am

Thanks for investigating about this, ... what is your name, actually? 

This is not super urgent since the adding of taxonomies actually works.

As soon I have some free time I will add another custom post type and use a standard template that involves more settings than I am currently using and in a kinda "best practice" way. Maybe there is something about the way I register the post types that is part of this problem. (Even though it is be just happening when SP is active, so very much a JS related error). 

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626