Shortcode works, image locking by patron-level not working


#1

Trying to integrate my Patron levels with my RadicalRuss.com blog. Using Patreon WordPress and Patreon Pro and Patreon Buttons plugins.

The shortcode [ppp_patron_only] works to block non-patrons from seeing content, but allows patrons of any level to see content.

Image locking using the Patron Level (minimum monetary level) is not working. All users can see all images, regardless of patron-level setting, or even if they’re not a patron.

I’ve deleted and reinstalled the plugins. I’ve deleted and recreated the client app. I’ve disabled other plugins and image CDN servers. I’ve created numerous dummy accounts for testing and used an incognito browser while testing. I’ve cleared all caches and cookies. Nothing seems to make any difference.

Test post at https://radicalruss.com/patreon-testing/ structured as follows:

IMAGE1 (“Bronze”) = $1 Patron Level

IMAGE2 (“Silver”) = $4.20 Patron Level

IMAGE3 (“Gold”) = $9.99 Patron Level

[ppp_patron_only]

Test Content

[/ppp_patron_only]


#2

ppp_patron_only is a Patron Pro shortcode, therefore please take any support related to it to the relevant support desk at CodeBard.

The image locking feature in the official plugin has a known issue on multisite WordPress installs due to multisite not allowing main htaccess to be easily overwritten. This affects people who are hosting their WP site at WordPress.com, or similar Multisite hosts. This is a situation involving server infrastructure and we are looking at what we can do about it.

Image feature should work properly for any singular WordPress install at any ordinary shared hosting package, VPSes, Dedicated servers and cloud installations.


#3

Thank you for that update. I am hosting at WP Engine, so that must be the problem.


#4

Yes, we have a known issue for multisite installs - WP engine is one.

By the way, we have various solutions queued, we will have a working one within this week.

Until then, you may use post-locking feature of the official plugin, advanced post locking features of the Pro plugin, or snippet-locking feature of the Pro plugin.


#5

Thank you. I will wait for your working version so I can release all my paid content in a consistent fashion.


#6

Can you please try doing what’s described below:

In your WPEngine account/site settings, find the section to add url redirects. ‘Edit URL Redirect’ may be its title. If you cant find it, just ask WPEngine support.

Then in that interface, enter the following values to relevant fields:

Redirect Name:

Patreon WordPress Image Protection

Domain:

All domains

Source :

^/wp-content/uploads/((.*?)(.png|.jpg|.gif|.jpeg|.bmp))$

Destination:

index.php?patreon_action=serve_patron_only_image&patron_only_image=$1

Then, save.

It may take some while for this rule to take effect. After waiting for 15-20 minutes, just try viewing a protected image. Or a protected image embedded in a protected post.


#7

Will do later tonight - happy to debug with you!


#8

May I add more extensions (.xlsx|.docx) to the list?


#9

No, only image extensions.

The code cannot serve non-image files at this moment.


#10

OK, thanks for the tip. Just now getting around to setting this up.


#11

So far the result has been:

When logged out: I see all the images on https://radicalruss.com/patreon-testing/

When logged in: I see all the images on https://radicalruss.com/patreon-testing/

But when I’m logged in and go to visual-edit the post, I do not see the images, though there is some space where they should be:

And in the Media Library, the thumbnails of the images I’ve set patrol_level values for are hidden (though non-patron_level thumbnails are fine).


#12

We will probably have to tune that rewrite that we used.

Can you try embedding an image in full size instead of any thumbnail size?


#13

Sure, but those images in the TEST post are the full size versions. They are just small images.


#14

I see…

Is it possible that you provide access to us to your WP installation and hosting account panel so I can directly arrange the rewrite rules. It seems like the rules we set are going to work but has some issues.

If possible, then please create a new admin user for me with a new password. And if you are able to share hosting control panel access, especially if you can create an extra account (manager accounts etc) that would be good. If you cant, then please change the password for the hosting account before sending it, and then when debugging is done, change it back. After debugging is done, also delete the WP admin account you created. An ftp account access would be great too, but may not be needed at this point.

The email to send the details to is ozgur@c.patreon.com . Please dont send any account details to any other email than this. Especially if anyone randomly asks you in the forum.


#15

Accounts created, emails sent to you with access info to ozgur@c.patreon.com


#16

This issue was resolved well and users at WPEngine will be able to use the image locking without issues it seems.

The code is being made to accommodate the fix now, and it will possibly make it into 1.1.1.

Until 1.1.1 is released, an updated package will be available possibly tomorrow, and ill post it in this thread - along with the redirect settings needed at WPEngine for it to work.


#17

Below is the solution, along with the updated package:

At WPEngine, the following rewrite rule must be added at ‘Redirect rules’ section in WPEngine site options (which you can find at https://my.wpengine.com -> Installs (from above), choosing relevant site, and then to Redirect Rules)

Redirect name:

Patreon WordPress Image Locking

Domain:

All domains, or relevant site only.

Source:

^/wp-content/uploads/((.*?)(.png|.jpg|.gif|.jpeg|.bmp))$

Destination:

/?patreon_action=serve_patron_only_image&patron_only_image=$1

(Advanced Settings) Match args:

Leave blank

(Advanced Settings) Rewrite type *:

break

Before saving, please make sure you downloaded and installed the linked package. This package can be installed after you deactivate & delete existing Patreon WordPress plugin. Your settings or locked post values, custom banner etc wont get affected.

This package is 1.1.0 mainly, with the changes which will accumulate to 1.1.1 soon, these fixes included.


#18

Please note that you must have disabled WPEngine CDN in your CDN settings, and also you must not be using any other CDN like Jetpack’s Image service etc. Any such service will take the control away from the plugin and prevent locking of images.


#19

Have you already made these changes to my site or will I have to implement them?


#20

All of them are live on your site. You shouldnt delete or update until 1.1.1 is out. Enjoy.