$article->getLocalizedData('abstract') OJS 3.3.0-13


In OJS 3.2, I used

        {if $article->getLocalizedData('abstract')}

In article_summary.tpl

But now, in OJS 3.3.0-13, $article->getLocalizedData(‘abstract’) is NULL.

Which would be the replacement? Thanks

Hi @juanito

What you probably want to do now is:

$publication = $article->getCurrentPublication(); $publication->getLocalizedData('abstract')

Because metadata is now stored at the Publication level. That’s a change that has been in place since 3.2 though so I am not sure why you haven’t run into this before.


1 Like

Thank you very much @jnugent

I did, in tpl

When an article hasn’t abstract i obtain two different results
Array ( [es_ES] => ) 1

I obtain 1 when is an old article and i have 're’saved in ojs 3.3.0-13
I obtain Array ( [es_ES] => ) 1 when is an old article and i haven’t 're’saved in ojs 3.3.0-13

I need do something like this:
{if $article->getCurrentPublication()->getLocalizedData('abstract')}

But abstract is always no null.

I used this solution not clean

{$publication = $article->getCurrentPublication()}
{if  $publication->getLocalizedData('abstract')|count_characters != NULL}

Thanks Jason.