Support » Plugin: Publish To Apple News » Publish does nothing?

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

    (@potatomaster)

    If you’re seeing a white screen, this sounds like a PHP error. It could be due to a misconfiguration of your web host for supporting the Apple News API. Can you please check your PHP error log and give us the message you’re seeing when this occurs?

    Thanks.

    OK – found it… here’s the error: PHP Fatal error: Call to a member function can_be_anchor_target() on a non-object in C:\inetpub\wwwroot\wp-content\plugins\publish-to-apple-news\includes\apple-exporter\builders\class-components.php on line 376

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    We’ve actually never seen that happen before. Can you supply the HTML for this post so we can take a closer look? Just go to the “Text” tab in the editor and paste it here as code.

    Thanks.

    It’s a big one….

    <table>
    <tbody>
    <tr>
    <td colspan="2" bgcolor="a91e22"><img class="size-full wp-image-499 alignnone" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Header.png" alt="Header" width="600" height="150" /></td>
    </tr>
    <tr>
    <td colspan="2">Formula Legend Strategy Report - Bahrain Grand Prix 2016</td>
    </tr>
    <tr>
    <td colspan="2">Round 2 - 57 Laps - 5.412km per lap - 308.238km race distance - high tyre wear</td>
    </tr>
    <tr>
    <td colspan="2"><a href="http://bit.ly/FLSRe0216">Bahrain GP F1 Strategy Report Podcast</a> - featuring <a href="http://www.superlicensepodcast.com/">Rod Gordon from Superlicense F1 Podcast</a></td>
    </tr>
    <tr>
    <td colspan="2" align="left" valign="top">
    
    F1’s dramatic and exciting on-track action continued at the 2016 Bahrain Grand Prix. We were treated to another frantic race, with plenty of overtakes, battles and collisions. Nico Rosberg took victory for Mercedes.
    
    Kimi Raikkonen finished in the runner-up spot, with Lewis Hamilton bouncing back from a disastrous start to take the final podium. The new-for-2016 tyre regulations threw up plenty of strategy options, here are some of the main headlines from the Bahrain GP:
    
    <strong>Mercedes splits strategy</strong>
    
    The two Mercedes drivers found themselves in very different positions after the first lap. Rosberg was out front with a clear lead, while Hamilton suffered contact with Valtteri Bottas at Turn 1. He dropped to as low as ninth on the opening tour of the Bahrain International Circuit but quickly made up places.
    
    The current constructors’ champions played it safe with Rosberg, starting on the super-softs, switching to new softs on lap 13, moving onto a scrubbed set of the softest tyre compound on lap 30 and then switching back to a new set of softs for the final stint on lap 39.
    
    The strategy mirrored the one used by Ferrari with Raikkonen, with Mercedes covering off the mild threat of the Finnish driver. But the team opted to try something different with Hamilton to help him make progress up the order following his poor start. We don’t often seen Mercedes splitting its strategy like this.
    
    Despite the damage his car suffered, Hamilton didn’t pit until lap 13. He went onto a set of medium tyres for a longer second stint, which helped him move past slower cars. Having dropped to sixth after his stop, he soon found himself back in a podium spot. He moved back to scrubbed super-softs on lap 28 and finally switched to the softs on lap 41, a later stop than most.
    
    The strategy was unconventional, but it is likely that Hamilton would have moved up to third place anyway even with the same strategy as Rosberg, even with the damage to his car. The Mercedes and Ferrari remain some way ahead of the chasing pack.
    
    <strong>Grosjean likes the super-softs</strong>
    
    Haas once again got its strategy right, which boosted Romain Grosjean to fifth place – going one better than Australia. The Frenchman was once again the sole Haas driver to reach the finish and he did so in spectacular style, using three sets of super-softs to complete some stunning overtakes and move up the order.
    
    He lined up in ninth place, the first driver to get free choice of tyre. Haas went for new super-softs and he exited the final corner on the first lap in sixth place. He pitted earlier than most around him on lap 11 for another new set of super-softs, before switching to a used set on lap 27.
    
    These stints on the fastest Pirelli compound meant we saw a feisty and racy Grosjean as he moved up the order. The differing strategies produced great racing due to drivers being out of position and on different compounds, and Grosjean’s battles were clear evidence of this. His final stint on the soft tyre, which he moved onto on lap 40, saw him move up to fifth, which is where he finished.
    
    <strong>Williams choose the mediums</strong>
    
    Unlike most, Williams opted to use the medium tyre more than other teams during the Bahrain Grand Prix but the decision failed to pay off. Felipe Massa and Bottas ran second and third early on, despite the latter’s contact with Hamilton, but switching early to the mediums had a big impact on the team’s end position.
    
    Massa stopped on lap seven, while Bottas pitted on lap eight and then had a drive-through, which he served on the next lap. Massa struggled on the mediums but Williams continued with a two-stop strategy. The Brazilian pitted for the final time on lap 29 for another set of the hardest tyre brought to Bahrain, while Bottas stopped for softs on lap 34.
    
    The track temperatures favoured a more aggressive strategy on the softer tyre compounds but Williams didn’t go down that route, instead going for longer stints on the harder Pirelli rubber. It backfired and Massa finished eighth, with Bottas down in ninth, not helped by the damage he sustained on lap one.
    
    <strong>Red Bull suffer higher deg</strong>
    
    Red Bull Racing looked to struggle more with higher tyre degradation in Bahrain, with Daniel Ricciardo often struggling at the end of his stints before diving into the pits. The team reacted quickly to this and the strategy eventually paid off, with Ricciardo finishing a rather lonely fourth.
    
    He stopped very early on lap six for the soft tyre, before fitting a new set on lap 24 and going for the medium tyre on lap 42. It could be argued running the harder compound in the third stint would have been more beneficial to his race, or running a third soft tyre in the shorter final stint could have helped him cut the gap to those ahead of him.
    
    But Ricciardo only had two sets of soft tyres available for the race and one set of mediums, which restricted Red Bull in its strategy decisions. In the end though, he was a distant fourth and would have likely finished in the same position even with a tweak in strategy. Meanwhile Daniil Kvyat completed two longer stints on the softs early on before two shorter final stints on the super-softs, which helped him move up the order from a poor grid position and avoid the higher tyre degradation. He finished seventh.
    
    <strong>Jack Leslie</strong> <a href="https://twitter.com/JackLeslieF1">@JackLeslieF1</a>
    
    <strong>Longest Stints</strong>
    
    Medium: Ericsson, Massa (27 laps)
    Soft: Perez (23 laps)
    Supersoft: Perez (19 laps)
    
    <strong>Most Stops</strong>
    
    Hulkenberg (4 - including drivethroughs)
    
    <strong>All the Data</strong>
    
    Thanks to <a href="https://twitter.com/pirellisport">Pirelli Motorsport</a> for the detailed infographics
    
    <a href="http://formulalegend.beermogul.com/wp-content/uploads/2016/04/Pirelli-BAH-2.jpg">
    <img class="aligncenter size-full wp-image-488" src="http://formulalegend.beermogul.com/wp-content/uploads/2016/04/Pirelli-BAH-2.jpg" alt="SC" width="1024" height="640" />
    </a>
    
    <a href="http://formulalegend.beermogul.com/wp-content/uploads/2016/04/Pirelli-BAH-1.png">
    <img class="aligncenter size-full wp-image-488" src="http://formulalegend.beermogul.com/wp-content/uploads/2016/04/Pirelli-BAH-1.png" alt="SC" width="1024" height="640" />
    </a>
    <strong>Stints by Driver</strong>
    </td>
    </tr>
    <tr>
    <td width="50%">
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="2"><img class="aligncenter size-full wp-image-488" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/SC.png" alt="SC" width="103" height="50" />Safety Car</td>
    </tr>
    <tr>
    <td>-</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-483" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Redbull.png" alt="Redbull" width="117" height="50" />3. Ricciardo</td>
    </tr>
    <tr>
    <td colspan="3">Start P5</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>Qual + 6 laps</td>
    <td>Pit 24.541</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>18 laps</td>
    <td>Pit 26.631</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>18 laps</td>
    <td>Pit 24.879</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>15 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P4 (+1)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-489" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Ferrari.png" alt="Ferrari" width="117" height="50" />5. Vettel</td>
    </tr>
    <tr>
    <td colspan="3">DID NOT START</td>
    </tr>
    <tr>
    <td colspan="3">DNS</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-490" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Merc.png" alt="Merc" width="117" height="50" />6. Rosberg</td>
    </tr>
    <tr>
    <td colspan="3">Start P2</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>Qual + 13 laps</td>
    <td>Pit 24.934</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>17 laps</td>
    <td>Pit 27.226</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>9 laps</td>
    <td>Pit 25.761</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>18 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finish P1 (+1)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-489" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Ferrari.png" alt="Ferrari" width="117" height="50" />7. Raikkonen</td>
    </tr>
    <tr>
    <td colspan="3">Start P4</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>Qual + 12 laps</td>
    <td>Pit 24.72</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>17 laps</td>
    <td>Pit 25.222</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>8 laps</td>
    <td>Pit 25.257</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>20 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P2 (+2)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-483" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Lotus.png" alt="Redbull" width="117" height="50" />8. Grosjean</td>
    </tr>
    <tr>
    <td colspan="3">Start P9</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>11 laps</td>
    <td>Pit 25.739</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>16 laps</td>
    <td>Pit 26.151</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>13 laps</td>
    <td>Pit 30.063</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>17 laps</td>
    <td>Pit 30.063</td>
    </tr>
    <tr>
    <td colspan="3">Finished P5 (+4)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-491" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Sauber.png" alt="Sauber" width="117" height="50" />9. Ericsson</td>
    </tr>
    <tr>
    <td colspan="3">Start P17</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>13 laps</td>
    <td>Pit 24.775</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>16 laps</td>
    <td>Pit 25.363</td>
    </tr>
    <tr>
    <td>Used Medium</td>
    <td>27 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P12 (+5)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-492" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/FI.png" alt="FI" width="117" height="50" />11. Perez</td>
    </tr>
    <tr>
    <td colspan="3">Start P18</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>2 laps</td>
    <td>Pit 30.326</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>12 laps</td>
    <td>Pit 25.068</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>23 laps</td>
    <td>Pit 24.517</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>19 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P16 (+2)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-491" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Sauber.png" alt="Sauber" width="117" height="50" />12. Nasr</td>
    </tr>
    <tr>
    <td colspan="3">Start P21</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>10 laps</td>
    <td>Pit 26.246</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>20 lap</td>
    <td>Pit 25.491</td>
    </tr>
    <tr>
    <td>Used Medium</td>
    <td>17 laps</td>
    <td>Pit 25.66</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>9 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P14 (+7)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-493" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Williams.png" alt="Williams" width="117" height="50" />19. Massa</td>
    </tr>
    <tr>
    <td colspan="3">Start P7</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>Qual + 7 laps</td>
    <td>Pit 24.093</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>22 laps</td>
    <td>Pit 24.236</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>27 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P8 (-1)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-495" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Lotus.png" alt="Toro" width="117" height="50" />20. Magnussen</td>
    </tr>
    <tr>
    <td colspan="3">Start Pit Lane</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>12 laps</td>
    <td>Pit 26.876</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>12 laps</td>
    <td>Pit 24.383</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>14 laps</td>
    <td>Pit 24.341</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>18 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P11 (+11)</td>
    </tr>
    </tbody>
    </table>
    </td>
    <td width="50%">
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-495" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Lotus.png" alt="Toro" width="117" height="50" />21. Guttierrez</td>
    </tr>
    <tr>
    <td colspan="3">Start P13</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>8 laps</td>
    <td>Pit 32.793</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>1 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Retired Lap 9 (DNF)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-494" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/McLaren.png" alt="McLaren" width="117" height="50" />22. Button</td>
    </tr>
    <tr>
    <td colspan="3">Start P14</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>6 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Retired Lap 6 (DNF)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-483" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Redbull.png" alt="Redbull" width="117" height="50" />26. Kvyat</td>
    </tr>
    <tr>
    <td colspan="3">Start P15</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>16 laps</td>
    <td>Pit 24.419</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>18 laps</td>
    <td>Pit 24.661</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>10 laps</td>
    <td>Pit 24.224</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>12 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P7 (+8)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-492" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/FI.png" alt="FI" width="117" height="50" />27. Hulkenberg</td>
    </tr>
    <tr>
    <td colspan="3">Start P8</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>Qual + 1 lap</td>
    <td>Pit 31.931</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>15 laps</td>
    <td>Pit 24.93</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>19 laps</td>
    <td>Pit 24.734</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>16 laps</td>
    <td>Pit 26.595</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>5 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P15 (-7)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-495" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Lotus.png" alt="Toro" width="117" height="50" />30. Palmer</td>
    </tr>
    <tr>
    <td colspan="3">Start P19</td>
    </tr>
    <tr>
    <td colspan="3">Did not start (DNS)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-495" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Toro.png" alt="Toro" width="117" height="50" />33. Verstappen</td>
    </tr>
    <tr>
    <td colspan="3">Start P10</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>10 laps</td>
    <td>Pit 25.81</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>16 laps</td>
    <td>Pit 25.594</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>20 laps</td>
    <td>Pit 25.129</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>11 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P6 (+4)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-490" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Merc.png" alt="Merc" width="117" height="50" />44. Hamilton</td>
    </tr>
    <tr>
    <td colspan="3">Start P1</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>Qual + 13 laps</td>
    <td>Pit 24.512</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>15 laps</td>
    <td>Pit 25.03</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>13 laps</td>
    <td>Pit 24.524</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>16 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P3 (-2)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-490" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/McLaren.png" alt="Merc" width="117" height="50" />47. Vandoorne</td>
    </tr>
    <tr>
    <td colspan="3">Start P12</td>
    </tr>
    <tr>
    <td>Used Supersoft</td>
    <td>9 laps</td>
    <td>Pit 24.604</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>16 laps</td>
    <td>Pit 24.682</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>16 laps</td>
    <td>Pit 25.316</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>15 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P10 (+2)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-495" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Toro.png" alt="Toro" width="117" height="50" />55. Sainz</td>
    </tr>
    <tr>
    <td colspan="3">Start P11</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>2 laps</td>
    <td>Pit 28.401</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>18 laps</td>
    <td>Pit 34.978</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>9 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Retired lap 29 (DNF)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-483" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Williams.png" alt="Redbull" width="117" height="50" />77. Bottas</td>
    </tr>
    <tr>
    <td colspan="3">Start P6</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>8 lap</td>
    <td>Pit 24.944</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>1 laps</td>
    <td>Pit 19.369</td>
    </tr>
    <tr>
    <td>Used Medium</td>
    <td>25 laps</td>
    <td>Pit 26.11</td>
    </tr>
    <tr>
    <td>Used Soft</td>
    <td>22 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P9 (-3)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-495" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Manor.png" alt="Toro" width="117" height="50" />88. Haryanto</td>
    </tr>
    <tr>
    <td colspan="3">Start P20</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>12 laps</td>
    <td>Pit 26.382</td>
    </tr>
    <tr>
    <td>Used Soft</td>
    <td>19 laps</td>
    <td>Pit 28.12</td>
    </tr>
    <tr>
    <td>Medium</td>
    <td>13 laps</td>
    <td>Pit 25.517</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>12 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P17 (+3)</td>
    </tr>
    </tbody>
    </table>
    &nbsp;
    <table>
    <tbody>
    <tr bgcolor="#e2e2e2">
    <td colspan="3"><img class="aligncenter size-full wp-image-495" src="http://formulalegend.beermogul.com/wp-content/uploads/2015/03/Manor.png" alt="Toro" width="117" height="50" />94. Wehrlein</td>
    </tr>
    <tr>
    <td colspan="3">Start P16</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>11 laps</td>
    <td>Pit 26.236</td>
    </tr>
    <tr>
    <td>Soft</td>
    <td>18 laps</td>
    <td>Pit 25.547</td>
    </tr>
    <tr>
    <td>Used Medium</td>
    <td>12 laps</td>
    <td>Pit 25.419</td>
    </tr>
    <tr>
    <td>Supersoft</td>
    <td>15 laps</td>
    <td>-</td>
    </tr>
    <tr>
    <td colspan="3">Finished P13 (+3)</td>
    </tr>
    </tbody>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan="2"><a href="http://formulalegend.beermogul.com/wp-content/uploads/2016/04/02-bahrain-lap-chart.png">
    <img class="aligncenter size-full wp-image-488" src="http://formulalegend.beermogul.com/wp-content/uploads/2016/04/02-bahrain-lap-chart.png" alt="SC" width="950" height="495" />
    </a></td>
    </tr>
    </tbody>
    </table>

    Hi Bradford – did you have a chance to look at this?

    Thx,
    Nathan.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    We have other issues in the queue ahead of this so we can’t guarantee a time for resolution. We’ll try to look into it this week.

    Ok thx

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    FYI, this still hasn’t found a place on our roadmap due to more urgent issues. Pull requests to the plugin are welcome if you have a developer and you’d like to see it fixed sooner.

    Same problem here

    Fatal error: Call to a member function can_be_anchor_target() on a non-object in /www/hc1025/wp_html/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/builders/class-components.php on line 448

    Also noted in my post about the issue.

    I think I’ve found the reason here.

    TL;DR: it’s a bug that’s triggered when no pullquote components are set as anchor targets, and is caused by trying to access an array index that doesn’t exist. I’ve pasted a fix at the end.

    CODE

    In class-components.php, within the function add_pullquote_if_needed(), around line 448 is the following code:

    for ( $position = $start; $position < $len; $position++ ) {
    	if ( $components[ $position ]->can_be_anchor_target() ) {
    	break;
    	}
    }
    
    // If none was found, do not add
    if ( ! $components[ $position ]->can_be_anchor_target() ) {
    	return;
    }

    ISSUE

    The issue is that if none of the components return a true value for can_be_anchor_target(), then when the for loop exits, $position is set to $len, not $len-1 (it increments one last time in order to test the $position < $len condition, which fails, ending the for loop).

    $len is set to count( $components ), so the highest index in the $components[] array is $len-1.

    But if we find no matches, $position is set to $len when we then do our final check:

    if ( ! $components[ $position ]->can_be_anchor_target() ) {

    As the max index of $components is $len-1, not $len, $components[$position] is not set, so attempting to access a “can_be_anchor_target()” function throws an exception.

    FIX

    A fix I’ve successfully tested, using a $targetFound flag, is below:

    $targetFound = false;
    
    for ( $position = $start; $position < $len; $position++ ) {
    	if ( $components[ $position ]->can_be_anchor_target() ) {
    		$targetFound = true;
    		break;
    	}
    }
    
    // If none was found, do not add
    if (!$targetFound) {
    	return;
    }
    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Rather than paste all this code here, can you propose it as a pull request to the plugin? It’s open source of course:

    https://github.com/alleyinteractive/apple-news

    Thanks.

    Gotta be honest, I’m a GitHub noob so I’ll just cause more issues than it’s worth. If you get a chance to fixing it yourself, great. If not, no worries. The changes are mentioned in my comments above.

    All the best.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    It just looks like you opened the pull request against the beezwax repo and not alleyinteractive. There’s a dropdown to set your base fork when you open the pull request. Just change it to alleyinteractive/apple-news instead and you’ll be all set.

    Thanks.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    This should be resolved in version 1.2.1 which is releasing very soon.

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.