Gutenberg Editor In worpdress keep crashing from time ti time and i get the message "The editor has encountered an unexpected error".
When I open the console I get a React error that said:" Cannot read property 'getCollectionByRoute' of undefined".
Anyone have any idea what causes this problem?
I'm facing the same problem as you, so I think it's something related to the post categories. So as a workaround to allow you editing your posts you can clean your site cookies and the next time you edit your post don't expand the categories section. If you need it then use the quick edit.
Related
I have been working with wp for a while now but just ran into a bug, that I can not fix with the information found in the internet.
I was editing a acf field. When I was finished writing into one of the fields, I mistakenly pressed enter. The page started reloading and all fields were gone. When going to the frontend, everything is displayed properly.
I tried to reactivate my ACF fields via the screen options what did not work. I inserted some code lines into my functions.php. or into the input.css because I thought maybe the right checkbox for the ACF fields to be displayed was missing. Nothing helped. Is there any other way to fix this issue.
thx in advance
greetings
I just come through this problem : for one of my field group, the fields box just disappeared at some point and I had no way no retrieve it thanks to the Wordpress Admin interface.
I don't know the reason why, but it appears that in my case, ACF registered some "unwanted" user meta in my database. (how is the question)
If you look inside your DB at the usermeta table content you will probably find some ACF entries like : metaboxhidden_acf-field-group or closedpostboxes_acf-field-group and maybe others...
The one causing trouble for me was meta-box-order_acf-field-group : I simply deleted the entry (but you can try editing it to remove the reference of your "lost" box) and the problem was solved.
Maybe too late to help you, but hope it can still help someone !
##EDIT##
Seems I may have a clue about how the box disappeared
Steps to reproduce :
Create a field group and associate it with whatever post type you have
Go create a whatever post (note : the Gutenberg editor is active on this edit page)
You should find your fields group at the bottom of the page
Try to move the group meta box above the Gutenberg editor (without success because it seems not possible)
Save your post
Come back to the edit page of the field group and refresh it
Tadaaa ! the fields group box is not available anymore
Go to your database, the usermeata table, you will find the entry causing the trouble again : meta-box-order_acf-field-group = a:3:{s:4:"side";s:32:"submitdiv,acf-field-group-fields";s:6:"normal";s:57:"acf-field-group-locations,acf-field-group-options,slugdiv";s:8:"advanced";s:0:"";}
I solved the problem by adding a custom script for the ACF with delete class closed on #acf-field-group-fields:
document.addEventListener("DOMContentLoaded", function(event) {
document.querySelector('#acf-field-group-fields').classList.remove('closed');
});
Im getting 500 error page on my woocommerce store checkout page. I noticed that when cart is empty there is no error, only when I add products in it
the address is https://www.belizajec.si/webshop/checkout/
when debug mode enabled I get this error
Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Translator For Header" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /home/apartkri/public_html/webshop/wp-includes/functions.php on line 4137
Fatal error: Class 'WC_Gateway_Paypal' not found in /home/apartkri/public_html/webshop/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php on line 105
thanks
Did you update to WooCommerce 3.0? Make sure the theme you are using is compatible with WooCommerce 3.0. If it's a plugin you are using for Paypal disable it first and see if thats the one causing an issue.
Seems like some incompatibility.
ok, the problem was solved by re-uploading all Woocommerce files over existing files on server.
This seems to be the plugin / theme conflict issue and to be honest cannot be judge directly.
However, there are some primary steps which you can follow, as below :-
Disable all plugins except "Woocommerce"
Activate WordPress default theme
After this check by following same procedure.
Let me know if I can help you further...
The title is pretty self explanatory, but I'm trying to figure out why WordPress allows this or if it's a setting in .htaccess perhaps, but here's the example:
I have a page, lets say a "Contact" page with the slug of "contact-us".
I go to http://example.com/contact-us/ -- everything works normally
I go to http://example.com/contact-us/contact-us/contact-us/contact-us/contact-us/contact-us (I could do this a million times) and it does NOT trigger a 404 error!
Why is this? If I enter a random string of numbers, it instantly triggers 404.php, but just repeating the page-slug does not trigger a 404.
I would like the page-slug to not be able to be repeated over and over again and trigger a 404 if it even gets repeated once.
Has anyone else experienced this issue? Is it possibly a canonical link issue or a "nofollow". I just don't understand why WordPress is not seeing this as 404 material.
Thanks in advance for any replies, suggestions, and help.
I have found a way to solve my own problem. Today I noticed that I was running two WordPress builds on the same server but one went to 404 while the other would just go back to the page. Now I knew it was a theme specific issue.
The answer is really simple actually, it was a permalink issue. In order for me to get the behavior I was looking for, I had to select "Post Name" as my permalink settings.
I previously had a custom string of options for a different style display using "Custom Structure", which I'm assuming had the "failsafe" in it.
I'm willing to switch out the extra permalink styling options in favor of the 404.
Although, those that opt to use a custom permalink structure should see if this happens to you.
I have a big problem and i dont know how to solve it. I have noticed that at dashboard when i pressed on "all posts" i get this ugly error:
"Invalid post type"
nothing more nothing less
I have tried a lot of things:
1. Update to latest version
2. Roll back to 3.9.1
3. Deactivated/activated all plugins
4. Deactivated custome theme
5. Modify edit.php locate in wp-admin folder and set this
$typenow = 'post';
if ( ! $typenow )
wp_die( __( 'Invalid post type' ) );
After this modification the "invalid post type" error was gone but when I was trying to modify a post at dashboard I noticed that the right column (category select, preview etc) was missing.
Does anyone knows how to fix this problem? Any ideas?
Thank you in advance,
P.S:
Please follow those links to see what I am trying to explain
https://dl.dropboxusercontent.com/u/5502709/wp.png
https://dl.dropboxusercontent.com/u/5502709/wp1.png
Late to the party, but I share this in case anyone comes looking with a similar problem to solve. It isn't a 'fix' but seems to be a 'workaround'.
I'm getting the "Invalid post type" error when I try to edit multiple custom posts in the edit screen. I think I may know a plugin that is causing it, but it's so integral to my site I can't just disable it, even just while I do the editing, so I was faced with the choice of either doing a LOT of individual edits, or coming up with a solution. This is what is working for me:
Set up all of the editing you want as normal. On 'enter' you get the "Invalid post type" message ... but the command phrase is still in the browser bar. Part of the phrase contains'post_type='. For me, at least, rather than the post type I'm trying to edit, it's showing the word 'Array'. By over typing that word with the actual custom post type name, then hitting 'enter' again it processes correctly. (I'm getting a message, but it's a notification or warning rather than an actual error message.)
Hope this helps someone. :-)
Same issue here as described by Kevin4fm:
When I select multiple items for moving to trash and after I hit the button, I can see the following URL in the adress bar of my browser together with the message "invalid post type":
http://example.com/wp-admin/edit.php?s=&post_status=all&post_type=Array&author=5&_wpnonce=67fdf1328g&_wp_http_referer=%2Fwp-admin%2Fedit.php%3Fpost_type%3DCPT%26author%3D5&action=trash&m=0&cat=0&paged=1&post%5B%5D=9462&post%5B%5D=7093&action2=-1
So I have changed the URL to the following and it works fine:
http://example.com/wp-admin/edit.php?s=&post_status=all&post_type=CPT&author=5&_wpnonce=67fdf1328g&_wp_http_referer=%2Fwp-admin%2Fedit.php%3Fpost_type%3DCPT%26author%3D5&action=trash&m=0&cat=0&paged=1&post%5B%5D=9462&post%5B%5D=7093&action2=-1
So changing post_type=Array to post_type=CPT (CPT = name of custom post type) in the adress bar of the browser does the job.
But I can't find any bugs nor in my CPT neither in my theme functions.php, so the reason must be somewhere else...
First of all thank you for helping me. I solved this problem but I dont understand what the problem was. First I removed all the folders of wordpress installation and upload an old backup of my website but the problem was still there. Then I start deleting one by one all the plugins and after each deletion I was checking the behaviour, finally when I deleted this plugin WP Super Cache (which by the way was deactivated) everything worked perfect. The strange think is that when I restore all folders of the wordpress installation the plugin was there but the problem was gone... So even thought the problem is gone I am not sure for the solution.
My suggestion to anyone with the same problem: Delete plugins not just deactivate.
Im trying to add the avatar into my heartbeat stream, or any additional token for that matter and I dont seem to be able to get it working.
I've edited the default message template "User adds a node, save user activity". Here is what ive setup as the single message
!avatar !username has added !node_type !node_title. !mail
Then in rules ive setup the following variables:
#avatar=[author:heartbeat-user-picture]
#username=[author:user-name-url]
#node_type=[node:type-name]
#node_title=[node:title-link]
#mail=[author:mail]
#types=[node:type-name]
I then use display suite to theme my heartbeat streams. But instead of getting the Avatar to display or the Authors email address I get the actual tokens.
My messsage I get is as following:
!avatar ankh2054 has added the following journal: test and journal entry . !mail
Any help would be appreciated.
I looked further and I found the issue, but still a little puzzled of how I can fix it. The reason is not displaying the picture is because I am using a custom node & content profile for my user profiles & therefore have assigned a custome CCK field for the user avatar. Display suite seems to only pickup the default picture that is assigned via the built in Drupal profile.
Any ideas ? thanks for yuor help so far :)