Tainacan Beta 0.21.15 - Campo 'special_thumbnail', Dublin Core e compatibilidade com o ElasticPress

English below

:tainacan: Olá comunidade :wave:!

Hoje soltamos uma pequena atualização com alguns recursos bem particulares. A versão 0.21.15 já pode ser baixada pelo painel de plugins do WordPress :tada:.

O que há de novo?

  • O importador e o exportador CSV agora possuem o campo special_thumbnail, o que permite a configuração das miniaturas de forma independente do Documento em importações. Isso é um pedido antigo da comunidade que foi mencionado aqui, aqui, aqui e aqui!
  • Tags Dublin Core agora aparecem no HTML da página do item caso um mapeamento para este padrão de metadados tenha sido feito na tela de mapeamentos. Isso vai ajudar crawlers como o Google Scholar e ferramentas como o Zotero a identificarem estes campos a partir dos links dos itens, como discutido aqui.
  • Compatibilidade com o plugin ElasticPress atualizada, agora pode ser a usada a versão 5.x do mesmo para melhor desempenho nas buscas;
  • Metadados do tipo Data agora podem ter definidos valores mínimo e máximo em suas configurações.

Correções de erro

  • Alguns erros básicos de funcionalidade e de segurança relacionados ao nosso endpoint REST de OAI-PMH foram corrigidos. Isto ainda não entrega a tão sonhada compatibilidade com este protocolo que sabemos que muitos almejam, mas já tem alguns primeiros passos que podem tornar o endpoint usável em alguns contextos.
  • Outros pequenas correções incluindo a compatibilidade com plugins terceiros mencionada aqui

Para desenvolvedores

  • Desenvolvedores agora podem usar os filtros tainacan-item-metadata-get-value-as-html e tainacan-item-metadata-get-value-as-string para manipular a saída dos valores de metadados de itens em diferentes contextos. Variações específicas por tipo (como o tainacan-item-metadata-get-value-as-string--type-compound) também foram criadas;
  • Com o filtro tainacan-item-metadata-relationship-get-item-thumbnail, desenvolvedores podem escolher o tamanho da imagem de miniatura carregada na exibição de valores em metadados de relacionamento;

Fiquem atentos para mais novidades em breve :eyes:


Português acima

:tainacan: Hello community! :wave:

Today we released a small update with some very special features. Version 0.21.15 can now be downloaded from the WordPress plugins repository :tada:.

What’s new?

  • The CSV importer and exporter now have a special_thumbnail field, which allows thumbnails to be configured independently of the Document being imported. This is a long-standing community request that has been mentioned here, here, here and here!
  • Dublin Core tags now appear in the HTML of the item page if a mapping to this metadata standard has been made in the mappings screen. This will help crawlers like Google Scholar and tools like Zotero to identify these fields from the item links, as discussed here.
  • Updated compatibility with the ElasticPress plugin, version 5.x can now be used for better search performance;
  • Metadata of type Data can now have minimum and maximum values defined in their settings.

Bug fixes

  • Some basic functionality and security bugs related to our OAI-PMH REST endpoint have been fixed. This still doesn’t deliver the long-awaited compatibility with this protocol that we know many people want, but it already has some first steps that could make the endpoint usable in some contexts.
  • Other small fixes, including the third party compatibility mentioned here

For developers

  • Developers can now use the tainacan-item-metadata-get-value-as-html and tainacan-item-metadata-get-value-as-string filters to manipulate the output of item metadata values in different contexts. Type-specific variations (such as tainacan-item-metadata-get-value-as-string--type-compound) have also been created;
  • With the tainacan-item-metadata-relationship-get-item-thumbnail filter, developers can choose the size of the thumbnail image loaded when displaying relationship metadata values;

Keep an eye for more news soon :eyes:

3 curtidas


Si todavía no hay compatibilidad, ¿por qué se anuncia en la web?

Oi @Sant_Joan_Biblioteca!

Este é um erro nosso mesmo.

Lá nas primeiras versões do Tainacan, alguns desenvolvedores fizeram implementações dedicadas para compabilidade completa com o OAI-PMH. Desde então estes desenvolvedores não puderam mais contribuir com o projeto.

O que fomos percebendo, com o passar do tempo, é que não só não era suficiente o que havia sido feito, como nem tínhamos força de trabalho suficiente para manter isso. Havia até uma falta de compreensão do que era o OAI-PMH (tanto que em alguns lugares mencionávamos como um formato sendo que é bem mais que isso, não é algo que se compare com o JSON por exemplo).

Por isso após conversas aqui neste fórum concordamos em retirar este aviso até que tenhamos de fato uma integração completa. Porém, como já havia em alguns lugares esta informação, podemos ter deixado para trás… notei aqui que na página inicial do site em Português e em Inglês a remoção foi feita, enquanto em Espanhol ainda está lá. Peço desculpas pelo erro, vamos corrigir ainda hoje!

Existem sim conversas sendo feitas para retomar os esforços de desenvolvimento neste tema. Mas elas dependem de algumas parcerias acontecerem. Com certeza anunciaremos por aqui qualquer avanço neste sentido, ok?

1 curtida

@mateus.m.luna, thanks so much, it’s really useful for me.

I use Elasticsearch to power the search of the repositories.

I have already tried with version 5.2, to be specific, and all works perfectly, but I’ve noticed one anomaly…

When you have filters in the repository elements it doesn’t show the filters even if there’s info, something like this (Just in repository elements):

But in your collection’s filters it works without troubles

I checked apache logs and the register show that:

[Wed May 07 18:01:02.295148 2025] [php:error] [pid 2045870:tid 2045870] [client] PHP Fatal error:  Uncaught Error: Cannot use object of type Tainacan\\Entities\\Metadatum as array in /var/www/html/acervo/wp-content/plugins/tainacan/classes/class-tainacan-elastic-press-lte-5.2.0.php:302\nStack trace:\n#0 /var/www/html/acervo/wp-content/plugins/tainacan/classes/class-tainacan-elastic-press-lte-5.2.0.php(185): Tainacan\\Elastic_Press_lte4->add_items_args()\n#1 /var/www/html/acervo/wp-includes/class-wp-hook.php(324): Tainacan\\Elastic_Press_lte4->filter_args()\n#2 /var/www/html/acervo/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#3 /var/www/html/acervo/wp-content/plugins/tainacan/classes/repositories/class-tainacan-items.php(377): apply_filters()\n#4 /var/www/html/acervo/wp-content/plugins/tainacan/classes/api/endpoints/class-tainacan-rest-items-controller.php(698): Tainacan\\Repositories\\Items->fetch()\n#5 /var/www/html/acervo/wp-includes/rest-api/class-wp-rest-server.php(1292): Tainacan\\API\\EndPoints\\REST_Items_Controller->get_items()\n#6 /var/www/html/acervo/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request()\n#7 /var/www/html/acervo/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch()\n#8 /var/www/html/acervo/wp-includes/rest-api.php(459): WP_REST_Server->serve_request()\n#9 /var/www/html/acervo/wp-includes/class-wp-hook.php(324): rest_api_loaded()\n#10 /var/www/html/acervo/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n#11 /var/www/html/acervo/wp-includes/plugin.php(565): WP_Hook->do_action()\n#12 /var/www/html/acervo/wp-includes/class-wp.php(418): do_action_ref_array()\n#13 /var/www/html/acervo/wp-includes/class-wp.php(818): WP->parse_request()\n#14 /var/www/html/acervo/wp-includes/functions.php(1342): WP->main()\n#15 /var/www/html/acervo/wp-blog-header.php(16): wp()\n#16 /var/www/html/acervo/index.php(17): require('...')\n#17 {main}\n  thrown in /var/www/html/acervo/wp-content/plugins/tainacan/classes/class-tainacan-elastic-press-lte-5.2.0.php on line 302, referer: https://repositorio-acervo.com/elementos/?search=felix&perpage=12&view_mode=table&paged=1&order=ASC&orderby=date&fetch_only=thumbnail%2Ctitle%2Cdescription&fetch_only_meta=179791%2C168696&metaquery%5B0%5D%5Bkey%5D=19&metaquery%5B0%5D%5Bvalue%5D%5B0%5D=6&metaquery%5B0%5D%5Bcompare%5D=IN

As I said, this filter is a metadata that contains info in several collections (Type: selection list, but with Text and Taxonomy also appears this mistake).

Does this make sense to you?

Versions:

  • Elasticsearch: 7.10.2
  • Elasticpress: 5.2.0
  • Last Tainacan version

@erickml could you please open an issue in our Github repository? @vnmedeiros I believe this might be an issue with repository metadata where the collection ID could be ‘default’?

1 curtida

Thanks!

2 curtidas

Hi @erickml.

Can you confirm if, when performing the sync with ElasticPress, you selected the post types of the collections you want to index in the “Advanced Options” section?
In ElasticPress v5.0, we need to explicitly select the post types that will be indexed:

Even after selecting it, does this unexpected behavior still occur?

Hi @vnmedeiros

Yeah, all post types are selected, incluiding filters. I’ve deleted all and sync again, but nothing yet.

@erickml Could you try indexing again, but this time manually selecting all the objects in the list to match what is shown in the image?


*Please observe the difference in the checkbox selection (I’m still not sure what it means).

@vnmedeiros yes, I have already synced again manually (selecting as you mentioned) but I am still unsuccessful.

Update. @vnmedeiros

Note that it only does not show the information with the default repository filters. When I have other repository metadata “assigned” it does show it.


(default repository filters)



Repository filters assigned


Look at! I think this scenary could help more. Not that I need the default repository filter too much, but specifically in this repository I do :rofl: