8000 papi_ajax blocked when using FORCE_SSL_ADMIN on non SSL site · Issue #213 · wp-papi/papi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

papi_ajax blocked when using FORCE_SSL_ADMIN on non SSL site #213

New issue < 8000 details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast overflow-auto" aria-label="Sign up for GitHub">

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

Closed
zombiefredrik opened this issue Jan 25, 2017 · 1 comment
Closed

papi_ajax blocked when using FORCE_SSL_ADMIN on non SSL site #213

zombiefredrik opened this issue Jan 25, 2017 · 1 comment
Milestone

Comments

@zombiefredrik
Copy link
Contributor

What I expected

papi_ajax to work in admin when doing conditionals (bool show as per example)

What happened instead

papi_ajax call was blocked since it was doing the request to get_bloginfo( 'url' ) and I have define('FORCE_SSL_ADMIN', true);

Steps to reproduce

set bloginfo url to http and turn on SSL as above in wp-config.
paste the sample code from conditionals in docs.

Proposed fix

Change row 34 - function ajax_url() in class-papi-admin-ajax.php
from
$url = esc_url( trailingslashit( get_bloginfo( 'url' ) ) . 'papi-ajax/' );
to
$url = esc_url( trailingslashit( home_url( '/' , is_ssl() ? 'https' : 'http' ) ) . 'papi-ajax/' );

What versions of softwares are you using?

  • Browser: chrome 55.0.2883.95 OSX
  • Papi: 3.x
  • WordPress: 4.7.1
@frozzare frozzare added the bug label Jan 25, 2017
@frozzare frozzare added this to the v3.1.19 milestone Jan 25, 2017
frozzare added a commit that referenced this issue Jan 25, 2017
frozzare added a commit that referenced this issue Jan 25, 2017
frozzare added a commit that referenced this issue Jan 25, 2017
@frozzare
Copy link
Member

Thanks, fixed in all branches and will be out in next patch version!

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

No branches or pull requests

2 participants
0