Illegal string offset 'baseurl' on protected image


#1

Hey there! I’m currently working on a webcomic site using the Webcomic Plugin and the Inkblot theme. I’m currently just developing on localhost to tinker a bit, and am half-expecting that’s the problem.

Anyway, I have locked some images to Patrons. The accompanying blog post shows the locked status, but the image (of post type ‘comic’, as was mentioned in another thread) is fully visible when logged out. And, when logged out, it gives me this error twice, above the image:

Warning: Illegal string offset 'baseurl' in C:\xampp\htdocs\tamberlane\wp-content\plugins\patreon-wordpress\classes\patreon_protect.php on line 89

That line would be:

if ( false !== strpos( $protocol_snipped_attachment_url, $protocol_snipped_baseurl['baseurl'] ) ) {

Am I right in thinking this is a localhost problem and will be fixed once I have an actual online integration? Or is something else wrong here?

Thanks!


#2

Alright! I think it was a localhost problem. I finally got into my hosting and set it up and it works fine. Woo!


#3

Great to hear.

What method did you use to integrate webcomic plugin and patreon wordpress? Is the implementation available now online? We would love to see it in action!


#4

Since it’s still early in development, nothing is necessarily in stone yet, but when it’s up and rolling I’ll be sure to link it to you!

I will note for other Webcomic plugin users, you have to lock the image itself; the post locking doesn’t cover the Webcomic media. And if you do “early access” like I do, where a page that’s patron-locked for one week will become public after that, that means you’ll have to remember to UNlock it when the right day comes along.

Hope this helps!


#5

Yeah, some webcomic plugins save the comic in a different field than content. In postmeta or etc. That requires another step to lock that extra content.

By the way, with the Pro plugin you can have various advanced locking methods like ‘show after x days’ etc.


#6

Already have the Pro plugin :slight_smile: But as far as I can tell the advanced locking methods work for the post but not the image since that’s locked separately. Am I correct?


#7

Yes, its the same for both official and pro plugin. You would need to use the functions from the plugins to check for locking other stuff like a comic which is saved outside content.

We may look into compatibility with major webcomic plugins in near future.


#8

That would be awesome! In the meantime, I’ll see if I can kludge something together with functions. Thanks for all your responses!


#9

Hi there! I’m a programmer working with pixel-prism on getting her integration working.

It looks like the Webcomic plugin indeed uses a webcomic_media on the post meta to store the attachment IDs. I’m going to try to see if there’s a way to hack in the check for that field in the existing protection lookup code.