The aggregator item description is currently a string field, but it's a perfect candidate for a text field.

Comments

amateescu’s picture

Status: Active » Postponed

Forgot to say that I'd prefer this to wait for #2112239: Convert base field and property definitions.

Berdir’s picture

Hm, we don't really have a format for it, as the data is always imported externally?

amateescu’s picture

How about setting a default format?

yched’s picture

How do we display it currently ?

Berdir’s picture

$variables['content'] = aggregator_filter_xss($item->getDescription());

Which is

return filter_xss($value, preg_split('/\s+|<|>/', \Drupal::config('aggregator.settings')->get('items.allowed_html'), -1, PREG_SPLIT_NO_EMPTY));

So yes, we could probably define a default format that does more or less the same, no idea what the preg_split() there does, though?

Berdir’s picture

Ah, that's just the splitting of the configuration into an array. So yes, then it would probably be quite nice to convert this into a text field with default format, we'd need to prevent that format from being deleted, though, or convert the setting into a filter selection?

ParisLiakos’s picture

Status: Postponed » Active

thats a nice idea:)
why dont we use the existing restricted_html text filter though?
the "allowed html tags" setting in aggregator always felt weird.

but whats more important i think is: where we expose the Field UI for items, so this can be made configurable

ParisLiakos’s picture

also. we can get rid of aggregator_teaser_length since, this will be configurable from the field formatter as well

closed #1830068: Change teaser_length to default_summary_length in aggregator? as duplicate

andypost’s picture

After #2181549: Provide a StringLong field item with schema type 'text' without a 'format' column there would be a string_long field with proper text-blob storage.
Formatter for that field seems will use text module.
The question here how to implement special (locked) text format while aggregator module installed so remove own filtering finctions

Berdir’s picture

Tried to write a quick patch for this, but noticed that aggregator_filter_xss() is also used for the author (only possible to display that in views), and the views integration will need to be updated. Seems a bit strange to also use a text field for that..

dcam’s picture

also. we can get rid of aggregator_teaser_length since, this will be configurable from the field formatter as well

Unless I've missed something when searching Aggregator's code, the teaser length setting can already be removed. I'm pretty sure it doesn't do anything in D8. See #2283877: Remove or use Aggregator's teaser_length setting.

Berdir’s picture

Version: 8.0.x-dev » 8.1.x-dev

aggregator_filter_xss() is gone but I don't think this can be done in 8.0.x. *Maybe* 8.1.x if we write an update function and don't consider the field type/storage an API, but maybe we have to.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

AdamPS’s picture

This issue seems to be covering two things

1) Use a formatter instead of extra field info. This is part of #2353867: [META] Expose Title and other base fields in Manage Display. The first step is included in #2993642: Mechanism to disable preprocessing of base fields in taxonomy and aggregator entity types so they can be configured via the field UI - that removes the special case processing so that a module could enable a formatter.

2) Converting the field from string to text would be challenging for BC. However do we really need that? It could work well if it remains as string with the aggregator_xss formatter. Then it doesn't need any complicated code to ensure a particular text format always exists.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Project: Drupal core » Aggregator
Version: 9.4.x-dev » 1.x-dev
Component: aggregator.module » Code

The aggregator module has been removed from Core in 10.0.x-dev and now lives on as a contrib module. Issues in the Core queue about the aggregator module, like this one, have been moved to the contrib module queue.

larowlan’s picture

Version: 1.x-dev » 2.x-dev

+1 for splitting this into two issues per the comment from @AdamPS