• Resolved Direta

    (@diretasistemas)


    I’m using Amazon S3 storage with multisites, and when whenever I paste a link from the s3, the plugin automatically converts it back to the domain (but only if the files exists in the s3). The problem with this is that I can’t put images on my popups, because the link is changed resulting in a broken image. It doesn’t happen with other popup plugins, but they aren’t nearly as good as popup maker (actually, this doesn’t happen anywhere else, only inside popup maker).

    Here’s pic of it happening:
    picture 1

    picture 2

    picture 3

    If you could shed any light on how to fix this or even what is causing it, anything at all, it would save my life. From the popup plugins I’ve tested so far, Popup Maker aligned perfectly with my necessities.

    If you need any other information or even an environment to make a simulation, just tell.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @diretasistemas – Hmm, the only thing that would make any since is if your AS3 plugin uses the_content filters to handle its business. That said we don’t have anything in place that would strip it out or replace urls. Simply doesn’t exist in our plugins code that I’m aware of.

    So does the link get replaced in the editor, after saving, or only on rendering? If only on rendering then its a filter issue.

    You need to apply your AS3’s the_content filter to pum_popup_content as well.

    Hope that helps.

    Hi,

    i am facing the same issue.
    I dont see any pum_popup_content.php. do u mind to point me to the write file?
    when u say applying the_content filter, accoding to this page https://deliciousbrains.com/wp-offload-s3/doc/filtering-urls-in-custom-content/,
    i should be adding $content = apply_filters( 'as3cf_filter_post_local_to_s3', $content );
    Where should i paste this into pum_popup_content ?

    Thread Starter Direta

    (@diretasistemas)

    @bbbbho
    Where is this pum_popup_content? I can’t find it.
    At this point I’m willing to add,test and then remove
    $content = apply_filters( 'as3cf_filter_post_local_to_s3', $content );
    from every single line until it works.

    • This reply was modified 7 years, 4 months ago by Direta.

    I dont see pum_popup_content as well.
    Have you succeed yet?

    Plugin Author Daniel Iser

    (@danieliser)

    @bbbbho – Its not a file, its a filter. Just like the_content is a filter.

    add_filter( 'pum_popup_content', function ( $content ) {
        // Do stuff here.
    
        return $content;
    });
    Thread Starter Direta

    (@diretasistemas)

    It worked, did the following

    In the file class-pum-popup.php

    public function get_content() {
       if ( ! $this->content ) {
          // Deprecated Filter
          $this->content = apply_filters( 'the_popup_content', $this->post_content, $this->ID );
       }
    
       // Original Line
       //return $this->content = apply_filters( 'pum_popup_content', $this->content, $this->ID );
       
       // Edited Version
       return $this->content = apply_filters( 'as3cf_filter_post_local_to_s3', apply_filters( 'pum_popup_content', $this->content, $this->ID ));
    }
    

    See if it works for you @bbbbho

    • This reply was modified 7 years, 4 months ago by Direta.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with Amazon S3’ is closed to new replies.