0

Edit

After some debugging, the issue seems to be around the text content of the tweet or Instagram photo. Looking in the database, if I save the caption or tweet text, the data suddenly cuts of in the parameters column.


I'm trying to create a social media wall pulling in photos from instagram and tweets from twitter with a certain tag. I create a list for each network (Twitter, instagram, EE) and then we join them lists.

I've got this working fine, the tweets and photos pull in fine, but when I try to cache the stash lists, I get some odd behaviour.

On the first load, it works great, the list is created and the list is saved in the database. If I then refresh that page, all of a sudden the list is either empty, has less results or has tags not rendering.

If I tell Stash to replace the list every time, then it works. Any idea's whats happening here?

{exp:stash:set_list name="instagram--{embed:term}{get:ig}" parse_tags="yes" parse_conditionals="yes" save="yes" scope="site" replace="no" refresh="60"}
    {exp:ig_picpuller:tagged_media user_id="1" limit="12" max_id="{get:ig}" tag="{embed:term}"}

        {!-- Instagram Data --}

    {/exp:ig_picpuller:tagged_media}
{/exp:stash:set_list}

{exp:stash:set_list name="twitter--{embed:term}{get:tweet}" parse_tags="yes" match="#^(?!\s*$).+#" against="image" parse_depth="2" parse_conditionals="yes" save="yes" scope="site" replace="no" refresh="60"}
    {exp:ce_tweet:search q="#{embed:term}" count="100" max_id="{get:tweet}"}
        {statuses}

            {!-- Twitter Data --}

        {/statuses}
    {/exp:ce_tweet:search}
{/exp:stash:set_list}

{exp:stash:set_list name="posts--{embed:term}" parse_tags="yes" parse_conditionals="yes" parse_depth="10"}
    {exp:channel:entries channel="channelName" limit="300" dynamic="no" disable="categories|category_fields|member_data|pagination"}

        {!-- EE Data --}

    {/exp:channel:entries}
{/exp:stash:set_list}

{exp:stash:join_lists name="media--{embed:term}" lists="twitter--{embed:term}{get:tweet},instagram--{embed:term}{get:ig},posts--{embed:term}"}



{exp:stash:get_list name="media--{embed:term}" limit="20" offset="{get:offset}" unique="id" orderby="date" sort="desc" sort_type="numeric"}
    {!-- Play with the list --}
{/exp:stash:get_list}
0

I figured out the issue, as mentioned in my edit, the problem was to do with the text content from the tweet or Instagram caption. I simply JSON Encoded/Decoded the text and everything started working again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.