Skip to content
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

Epoch 2.0 Cookie Issue with name, email, website #207

Open
ronalfy opened this issue May 29, 2016 · 8 comments
Open

Epoch 2.0 Cookie Issue with name, email, website #207

ronalfy opened this issue May 29, 2016 · 8 comments
Assignees
Milestone

Comments

@ronalfy
Copy link
Contributor

ronalfy commented May 29, 2016

Need to set the cookies for logged-out users.

@ronalfy ronalfy added the bug label May 29, 2016
@ronalfy ronalfy added this to the 2.0 milestone May 29, 2016
@Vernal
Copy link
Contributor

Vernal commented Sep 19, 2016

use wp_set_comment_cookies

@Shelob9
Copy link
Contributor

Shelob9 commented Sep 23, 2016

I spoke with Ryan about this. wp_set_comment_cookies() isn't used by core because setting cookies isn't RESTful, which make sense. He recommended reverse engineering wp_set_comment_cookies() with javascript, which sucks, or going with out.

Reverse engineering it sucks and would mess with forward compatibility.

We could call the regular function ourselves. Would not take effect until next page load, but I think that's OK, like this I think:

    add_action( 'rest_insert_comment', function( $comment ){
        if( isset( $_GET[ 'epoch' ] ) ){
            wp_set_comment_cookies( $comment, get_user_by( 'ID', get_current_user_id() ) );
        }
    });

Let's get some judgment of @Vernal here.

@Vernal
Copy link
Contributor

Vernal commented Sep 26, 2016

So this is to say that the comment would post, but the cookie would not be set until the user revisits/reloads the site @Shelob9 ?

@Shelob9
Copy link
Contributor

Shelob9 commented Sep 26, 2016

That is correct.

On Sep 26, 2016 2:33 PM, "Jason Lemieux" notifications@github.com wrote:

So this is to say that the comment would post, but the cookie would not be
set until the user revisits/reloads the site @Shelob9
https://github.com/Shelob9 ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#207 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB5uR1IX5EpJAFpJ9Of26wulcXjl75XFks5quA_wgaJpZM4IpOIA
.

@Shelob9
Copy link
Contributor

Shelob9 commented Sep 26, 2016

I think.

On Sep 26, 2016 3:03 PM, wrote:

That is correct.

On Sep 26, 2016 2:33 PM, "Jason Lemieux" notifications@github.com wrote:

So this is to say that the comment would post, but the cookie would not
be set until the user revisits/reloads the site @Shelob9
https://github.com/Shelob9 ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#207 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB5uR1IX5EpJAFpJ9Of26wulcXjl75XFks5quA_wgaJpZM4IpOIA
.

@Vernal
Copy link
Contributor

Vernal commented Feb 9, 2017

I think that's totally fine.

@Vernal
Copy link
Contributor

Vernal commented Feb 9, 2017

hey @lukecav and @shawnhooper can I get one of you guys to focus on this issue and we'll see if it helps resolve #218, #181, and #211? Let's start with this one. The solution could very well be right here..

@lukecav
Copy link

lukecav commented Feb 9, 2017

@Vernal Just looking now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants