Forum Replies Created
-
Author
-
clutchnycParticipant
I have this same problem resetting Passwords for my users. I’ll try the update included here.
September 4, 2013 at 23:48 in reply to: Issue with "Custom Metaboxes and Fields for WordPress" Script #2277clutchnycParticipantFixed! Thank you
September 4, 2013 at 00:08 in reply to: Issue with "Custom Metaboxes and Fields for WordPress" Script #2192clutchnycParticipantWow, amazing – thank you!!
clutchnycParticipantI found out this is related to my webhost: WPengine. They have restrictions on how custom log-ins must be coded. This may be useful if you have other customers who use WPengine like I do.
In the file page-parts/general-login-modal.php they had me change
<form action="<?php echo wp_login_url(apply_filters('kleo_modal_login_redirect', '') ); ?>"
to
<form action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>"
Here is the background info that WPengine sent me:
The problem on our platform comes from when the form is hardcoded directly to “wp-login.php”. Here’s some example code from a similar issue:
<form action=”<?php echo get_option(‘home’); ?>/wp-login.php?redirect_to=<?php echo urlencode($_SERVER[‘REQUEST_URI’]); ?>” method=”post”>
To compare, here’s what WordPress uses in the “wp-login.php” file:
<form name=”loginform” id=”loginform” action=”<?php echo esc_url( site_url( ‘wp-login.php’, ‘login_post’ ) ); ?>” method=”post”>
The most important part of the code from “wp-login.php” file is this portion:
site_url( ‘wp-login.php’, ‘login_post’ )
Our security measures rely on modifying the “site_url()” function when the second part of that function is “login_post”. If you’re not using the “site_url()” function, or if you’re are using the “site_url()” function but not “login_post”, then the custom login form is going to run into our security block.
Our engineers have recommended to modify the code to generate the login URL the same way that WordPress does because our system reads the direct call to wp-login.php.So, I’m now able to log on using the custom modal window, but this function you gave me to keep users on the same page they are on when they log on doesn’t work anymore. everyone gets redirected to the homepage upon login. Can you suggest an update that might work given that I can’t use $_SERVER[‘REQUEST_URI’]?
add_action('after_setup_theme','kleo_my_actions');
function kleo_my_actions() {
add_filter('kleo_modal_login_redirect','my_custom_redirect');
}
function my_custom_redirect() {
return $_SERVER['REQUEST_URI'];
}thanks!
clutchnycParticipantOne Suggestion: When users log in using the modal window, they seem to always be redirected to the homepage. It would be great if login from the modal window would keep users on whatever page they are on instead of redirecting to the homepage.
Thank you!!
clutchnycParticipantOk, I have found the foundation.min.js file, but it is really hard to read/edit.
Sorry for not knowing better, but how do I create a minified version of this code snippet? this is the code I need to add to create the fix for the top level navbar in mobile view. I tried to minify myself by hand, but every attempt I made broke the drop down nav bar.
COPY CODEurl = $link.attr('href'); if (url && url.length > 1) { var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li><li><a href="' + url + '">' + $link.text() +'</a></li>'); } else { var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li>'); }
If you can help me to get the above code correctly minfied, I can update the foundation.min.js file myself. thank you!!
clutchnycParticipantHi Robert,
Thanks for the reply. Yea, I agree, it’s not a bug, but I’d sure like to find a work around.I did some research, and I found this with other users reporting the same issue:
https://github.com/zurb/foundation/issues/1570I’ve tried all these suggestions, but none of them work for me, I’m afraid.
I’ve been editing jquery.foundation.topbar.js, but not seeing any changes on the site.
Thanks again for your support.
Tim -
AuthorPosts