Adding the type property:
'type' => FILTER_TYPE_MARKUP_LANGUAGE,
to commons_hashtags_filter_info's filter_hashtags make a notice go away from the edit module.

Comments

BarisW’s picture

Project: Commons Hashtags » Edit

This it not something that should be taken of in other contrib modules. The edit module should check if 'type' isset, and if not, fallback to a default. According to the docs type is not a needed parameter.

If the maintainer of the Edit module does not want to add extra checks you can do this yourself easily using a hook_filter_info_alter.

<?php
MYMODULE_filter_info_alter(&$filters) {
  $filters['filter_hashtags']['type'] = FILTER_TYPE_MARKUP_LANGUAGE;
}
?>
kingfisher64’s picture

Is this issue relevant to the following error message?

The filter "insert_view" has no type specified! This is required for the Edit module. Please consult Edit module's README

I've read https://drupal.org/node/1817474 like the readme suggests however it's double dutch to me! :)

Could someone please instruct me as how to solve this? I know how to get rid of the errors - uninstall insert_view module however it's an essential part of the site so that's not really an option.

If it's not the same issue my apologies in advance.

wim leers’s picture

Title: The edit module needs a 'type' in hook_filter_info » Set filter type for the filter_hashtags filter (Commons Hashtags module) and insert_view filter (Insert View module)
Assigned: Unassigned » wim leers
Category: Bug report » Feature request
Priority: Normal » Minor
Issue summary: View changes
Status: Active » Fixed
Issue tags: +Spark

BarisW is right: Edit extends Drupal 7 core's API in this way, so other modules should not be forced to implement this. Whenever somebody reports another filter, I implement it in Edit module's hook_filter_info_alter().

I've now implemented it for both filter_hashtags and insert_view.

Thanks for reporting!

http://drupalcode.org/project/edit.git/commit/c2fe8f1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.