visual-framework / vf-wp

WordPress theme and plugins for Visual Framework integration
3 stars 6 forks source link

EMBL News block is not correctly picking up site wise news #1354

Closed sandykadam closed 1 month ago

sandykadam commented 2 months ago

Recently we noticed that EMBL News block is not picking up news related to EBI with specific keyword.

e.g EMBL-EBI News with filter by keywords using "funding".

Output is

Screenshot 2024-09-20 at 09 28 15

but news coming are incorrect, we were expecting below news of EBI with funding keyword.

Screenshot 2024-09-20 at 09 28 25

After investigation we found that the API which is getting invoked in background is not using correct param and hence we need to make the change with following API.

OLD - filter-field-value[field_display_publication]=EMBL-EBI%20News

e.g https://content.embl.org/api/v1/pattern.html?filter-content-type=article&filter-field-contains[field_article_tags.entity.name]=funding&filter-field-value[field_display_publication]=EMBL-EBI%20News&limit=3&pattern=vf-news-item-default&sort-field-value[created]=DESC

NEW - filter-field-value[field_target_display]=embl-ebi

https://content.embl.org/api/v1/pattern.html?filter-content-type=article&filter-field-contains[field_article_tags.entity.name]=funding&filter-field-value[field_target_display]=embl-ebi&limit=3&pattern=vf-news-item-default&sort-field-value[created]=DESC

cc: @bhushan-ebi @mshujamalik-ebi