• Resolved ftcpublications

    (@ftcpublications)


    Bug – Posts with images don’t work.

    “There has been an error with the API. Please make sure your API settings are correct and try again: The attachment filename.jpg could not be included in the request because it was empty.”

    WordPress installation is a Professionally managed installation with no quirky or hacked code. Pure WordPress and properly configured.

    https://www.ads-software.com/plugins/publish-to-apple-news/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Images work fine for most people, but there are some who are having problems. We are trying to narrow down the root cause of this issue. Can you please provide the JSON file for the post that encountered this error and a link to the post on your site?

    Thanks.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Also can you please ensure that your host doesn’t block usage of the function file_get_contents for remote files? Specifically they may need to enable allow_url_fopen in your PHP config.

    Thanks.

    Thread Starter ftcpublications

    (@ftcpublications)

    Thanks Bradford Campeau-Laurion – That resolved the issue. This should be part of the documentation. We will change our rating and mark this resolved. Thanks

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Thanks. I’ve updated the installation docs accordingly.

    I changed the php.ini file but I am still getting that error on my site.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Can you please provide a link to the post on your site and paste the JSON file as code here?

    I am also getting the same error message. I checked with my host twice and confirmed on the allow_url_fopen being enabled. I tried disabling all my plugins, it still didnt work. I checked on theme settings, cloudflare – nope,same issue.

    I then tried stripping my youtube URL embed. It started pushing successfully.
    I am guessing that the issue is due to Apples formatting reqts when you opt for Apple News format. it was perfect till i used the RSS format.

    but not being able to embed youtube videos is a big issue for news sites like mine. you can check on wiselywise.com and its channel on apple news to see the difference.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    We’re looking into this soon. As stated before, this issue is logged in our queue.

    I was also having this issue for a bit last night. I was digging through all of your code and I made a style guide with all of the component options you parsed the content/html for. It seemed to not like instagram embeds (the actual embed code copied from instagram.com) and HTML5 video tags. The HTML5 audio tags worked fine, as does just a plain ‘ol youtube or instagram url. When placing just the URL of a youtube video, similar to how WordPress handles embeds. However, it made two entries in the article.json file. One is created using the role of “body” and another below it has the role of “embedwebvideo” with the URL field set to NULL. In my case, that was causing most of the issues. I could open up the article.json file and make the URL change and then I could open up the article in NewsPreview.app.

    {
        "role": "body",
        "text": "YouTube",
        "format": "markdown",
        "textStyle": "default-body",
        "layout": "body-layout"
      }, {
        "role": "embedwebvideo",
        "aspectRatio": 1.777,
        "URL": ""
      },

    Which throws this error in News Preview:

    Error: "URL" was <null> should be valid URL with one of ["http","https"] scheme(s)
    document -> components -> [14] -> URL
    
    Error: no components defined for role=embedwebvideo
    document -> components -> [14]

    I couldn’t get them to go away either. Even after deleting the code, the data remained in the database and wasn’t ‘cleaned’ it seems. I deactivated, deleted plugin, then reinstalled. I did have some issues doing that as well, but there was no issues when using the latest git build.

    On a side note, thank you all for this plugin. With hardly any valuable documents at dev.Apple, this has made taking the plunge into ANF a little bit easier to take.

    One last question. Is there a method for passing things to the constructor through the_content or using custom fields? For example, using parallax, or setting up animations, or other components?

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Thanks, we’re looking into this soon.

    We still get this error. We made the change to the php file.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    We’re no longer troubleshooting this issue as it stands.

    If you’re experiencing this error, please update to the latest version of the plugin and enable “Use Remote Images” in the plugin settings.

    Thanks.

    I have loaded remoted images enabled. It is still giving the error: Error: This is unsupported by Apple News, removed img, img.

    These are two images within the body of the article. Not sure what is happening. My site is here: https://thatmacnerd.com

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Can you please open a new thread for your issue instead of commenting on a closed one? This isn’t the same issue.

    When you do open it, please provide the JSON output for the article in question either as a download link or by pasting it here as code.

    Thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘BUG: The attachment filename.jpg could not be included in the request because’ is closed to new replies.