-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message when ID is missing #11
Comments
A better option would be to make it work just as you expected it to - if no slug is provided, auto-generate it based on the name. Just pass the name through sanitize_title() |
+1 for that |
Every once in awhile, I still get this message: When it happens, I have to refresh the screen, then I can add a sidebar with the same name I was trying. |
I tried to reproduce this and so far only see “choose a valid Name” for '' (no value) or 0 (equates to empty). We could try if ( '' === $args['name'] ) {
wp_die( $this->error( 1 ) );
exit;
} We could also add the 'required' attribute to the name field so that it can't be submitted if it's empty.
and:
|
@jaygidwitz could you give this a shot and just make sure it is working for you on a WP Install (develop branch - https://github.com/copyblogger/genesis-simple-sidebars/archive/develop.zip)? I'm not getting this in my testing today so it could be my rapid fire testing Friday/Saturday. If it is good for everyone else, I'm cool with it. |
Okay so, little problem I think: I made a sidebar named I left the id blank. So an id of Now whenever I add a widget to this sidebar it also is added to the primary sidebar with and id of Noting that I was not able to replicate this with other sidebars subsequently. Testing if this a prexisting bug in Production:
I was able to replicate this again with the develop plugin but following the above instructions on a different wp install.
@dreamwhisper I wasn't able to replicate your error other than using nick's methods. I also don't know if my error is more of an edge case and if you would simply like a new issue for this, or if it's too much of an edge case and we don't need an issue. |
I'm curious if creating a sidebar manually with the same specs gives the same result. Name => Sidebar |
OK, let's get this into another issue. It might not even be fixable. Seems like WordPress basically ignores the ID and is using the Title in some instances. I'll have to investigate. But this shouldn't hold back a release, IMO. |
👍 |
I created a Dynamic Sidebar, and since a) I'm used to post slugs auto-generating and b) it's been a while since I used it, I neglected to use the ID.
That led to this error screen:
I then had to use the back button in my browser and add the ID.
Is there any way to do an on-screen error like we do when processing payments, where the missing or incorrect box is highlighted?
(Tested this in Rainmaker, on this site: http://rebecca-rainmaker.pre-nyc2-01.rmkr.net/ Mac/Chrome)
Tagging @nathanrice but if it should go to someone else, please re-assign :D
The text was updated successfully, but these errors were encountered: