Hi Terralemon!
I think you are saying there are two separate issues here, so let’s address those.
Issue 1: The Field Variables
If I use the code “{article_tweets type=“oembed”}{html}{/article_tweets}” the tweet(s) are correctly displayed but as soon as I don’t add any tweets I get an error.
What is the error that you receive here?
I am unable to replicate this. I have tried using the fieldtype with and without tweets, and with and without the oembed tag. I get no errors at all. If the tweet is empty, there is simply no output. I’m testing with CE Tweet 1.3.8, EE2.10.2, and PHP 5.6.10.
If you just put the CE Tweet code by itself in a template do you get the error? If not, then the problem likely lies somewhere else. Here’s what I’m using to test:
{!-- I'm including the script tag here, but Devot:ee keeps stripping it out , so just pretend --}
{!-- this entry has two tweets --} {exp:channel:entries channel="ce_tweet_example" url_title="ce-tweet-example" dynamic="off"} {software_tweet type="oembed"}{html}{/software_tweet} {/exp:channel:entries}
{!-- this entry has no tweets --} {exp:channel:entries channel="ce_tweet_example" url_title="ce-tweet-example-2" dynamic="off"} {software_tweet type="oembed"}{html}{/software_tweet} {/exp:channel:entries}
The tweets from the first tag show up, and no tweets show up for the second entry, as expected.
Issue 2: The CE Tweet FieldType Global Settings
When selecting the ce_tweet field (underneath add-ons) I get a PHP error (Array to string conversion for form_helper.php)
That’s just a notice, not an error, but let’s take care of it. I think the CodeIgniter method used for the settings used to accept an array (which makes more sense, imho), and now they changed it to a string. We can just change this line of ft.ce_tweet.php from this:
$form .= form_input( 'results_per_page', $results_per_page, array( 'id' => 'ce_tweet_results_per_page' ) ) . '<br><br>';
to this:
$form .= form_input( 'results_per_page', $results_per_page ) . '<br><br>';
Does making that change get rid of the notice?
|