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

Show message on meta-box when post is filtered out #538

Merged
merged 1 commit into from Nov 22, 2016

Conversation

@diegoquinteiro
Copy link
Collaborator

diegoquinteiro commented Nov 21, 2016

This PR:

  • Adds a message on the meta-box for when the post was filtered out programatically.

Follows #504

Copy link
Collaborator

everton-rosario left a comment

Looks good.
:shipit:

@everton-rosario everton-rosario removed their assignment Nov 22, 2016
@everton-rosario

This comment has been minimized.

Copy link
Collaborator

everton-rosario commented Nov 22, 2016

@philipjohn please add this to the next release.

@diegoquinteiro diegoquinteiro merged commit cb27793 into master Nov 22, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@diegoquinteiro diegoquinteiro deleted the rinatkhaziev-should_submit_post_filter branch Nov 22, 2016
@msurguy

This comment has been minimized.

Copy link
Contributor

msurguy commented Nov 28, 2016

I just installed this plugin and am seeing message "This post will not be submitted to Instant Articles due to a rule created in your site" on all new posts. Upon reviewing the code for this PR it appears that $shoud_publish_post is not defined anywhere, thus triggering the message to show.

Is that a fair assumption that the variable $should_submit_post should be used instead of $shoud_publish_post instead ?

@petarstojkovik

This comment has been minimized.

Copy link

petarstojkovik commented Nov 28, 2016

I'm seeing the same message on all new posts after I updated the plugin to v. 3.2.1. Previously everything worked great. I'm certain that my custom rules are OK.

{
    "rules":[
        {
            "class":"IgnoreRule",
            "selector":"div.td-gallery-slide-top"
        },
        {
            "class":"IgnoreRule",
            "selector":"style"
        },
        {
            "class":"IgnoreRule",
            "selector":"div.td-button"
        },
        {
            "class":"PassThroughRule",
            "selector":"div.td-doubleSlider-1"
        },
        {
            "class":"PassThroughRule",
            "selector":"div.td-slide-on-2-columns"
        },
        {
            "class":"PassThroughRule",
            "selector":"div.td-doubleSlider-2"
        },
        {
            "class":"PassThroughRule",
            "selector":"div.td-slider"
        },
        {
            "class":"PassThroughRule",
            "selector":"div.td-slide-item"
        },
        {
            "class":"SlideshowRule",
            "selector":"div.post_td_gallery"
        },
        {
            "class":"SlideshowImageRule",
            "selector":"div.td-slide-item",
            "properties":{
                "image.url":{
                    "type":"string",
                    "selector":"a.slide-gallery-image-link",
                    "attribute":"href"
                },
                "caption.title":{
                    "type":"string",
                    "selector":"div.td-gallery-slide-copywrite"
                }
            }
        },
        {
            "class":"ImageRule",
            "selector":"//img|//p[img]|//p[a[img]]|//a[img]",
            "properties":{
                "image.url":{
                    "type":"string",
                    "selector":"img",
                    "attribute":"src"
                },
                "image.caption":{
                    "type":"element",
                    "selector":"img[@alt]"
                },
                "image.like":{
                    "type":"exists",
                    "selector":"img"
                },
                "image.comments":{
                    "type":"exists",
                    "selector":"img"
                }
            }
        }
    ]
}
@diegoquinteiro

This comment has been minimized.

Copy link
Collaborator Author

diegoquinteiro commented Nov 28, 2016

Thanks for reporting; this was a typo that unfortunately went through the release. I'm going to fix and release on 3.2.2 within the day.

Thank you!

@diegoquinteiro

This comment has been minimized.

Copy link
Collaborator Author

diegoquinteiro commented Nov 28, 2016

That said, only the message is affected, meaning your articles are being submitted to IA regardless.

@petarstojkovik

This comment has been minimized.

Copy link

petarstojkovik commented Nov 28, 2016

@diegoquinteiro Exactly. Instant Articles are still being submitted to FB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.