ChrisRAoW / mautic-rss-to-email-bundle

Mautic plugin to send emails from RSS
102 stars 23 forks source link

Feed Error #17

Closed IADDIC closed 5 years ago

IADDIC commented 5 years ago

Hello, I have your plugin installed in Mautic and when I create and publish an email I get this error.

Error: cURL error 22: The requested URL returned error: 400 Bad Request

the feed I am using is below

https://www.sheltertheworld.org/shelter-the-world-shop/feed/

I have the following code in my email template (code mode)

`

{feed url="https://www.sheltertheworld.org/shelter-the-world-shop/feed/"} {feeditems count="3"}

{feeditem:title}

                    <p><small>{feeditem:date format="d-m-Y H:i"}</small></p>
                    <p>{feeditem:description}</p>
                    <p><img src="{feeditem:image}" /></p>
                        {/feeditems}
                    {/feed}
                  </div>`

I noticed in a previous message (#15 Feed not working) you said "look like the plugin isn't active yet. Did you activated it after installing" What does that mean? I have installed it, created an email, and published the email. Is there another step that I missed regarding activation of the plugin??

Thanks, Rich

ChrisRAoW commented 5 years ago

In the case of #15 the tokens weren't even replace. That's why It looked like the plugin wasn't activated yet.

In your case it seems the feed isn't accesible for some reason.

This is what I read somewhere in another topic (related to the xml parser library we are using: Reason for this error: Some RSS feed provider block "SimplePie" as user agent request

Could you try the following (didn't tried it myself:

Open file "plugin_folder/Parser/Parser.php"

And add the following line on line 30 $feed->set_useragent('mautic');

Save the file and try again.

IADDIC commented 5 years ago

produced a 500 error when I tried to preview the email

image

ChrisRAoW commented 5 years ago

Sorry, my bad. Was putting it into the wrong class. Can you try it in file: *plugin_folder*/Feed/Feed.php

And then add the line after line 12: $feed->set_useragent('mautic');

IADDIC commented 5 years ago

Thank you ChrisRAoW, That fix has indeed got me going. I applaud you for doing this as it adds so much value to our marketing efforts.

ChrisRAoW commented 5 years ago

@IADDIC It's now in the current master / latest release. Nice to hear this plugin is adding such value to your marketing efforts!