Hi all,
I'm trying to insert blank rows into a view (so the the last row of my flexbox can be left-justified)... to achieve this attempted to port the 'Views Row Insert' D7 module. Installation works fine, but I can't enable it... when I try to enable it in a new view I get an " invalid style plugin" error... it is shown as a format option for an existing view, but whenever I attempt to enable it, nothing happens.
When I do these errors are in the logs: _views_create_handler - loading handler style failed: class views_row_insert_plugin_style_custom_row could not be loaded. Verify that the class has been declared and the class file has been registered in a hook_autoload_info() implementation.
and Call to a member function uses_fields() on null in ViewsUiBaseViewsWizard->build_form_style() (line 341 of C:\wamp64\www\mattjaggar\web\core\modules\views_ui\wizards\views_ui_base_views_wizard.php).
views_row_insert.info used to contain the line:
files[] = views_row_insert_plugin_style_custom_row.inc
but I have already removed this and instead inserted the following to the end of views_row_insert.module as advised by https://docs.backdropcms.org/converting-modules-from-drupal
function hook_autoload_info() { return array( 'views_row_insert_plugin_style_custom_row' => 'views_row_insert_plugin_style_custom_row.inc', ); }
When I run update.php I get the following warnings:
- Warning: include_once(XXXXXX/modules/views_row_insert/templates/views_row_insert.views.inc): failed to open stream: No such file or directory in include_once() (line 574 of XXXXXXX\core\includes\theme.inc).
- Warning: include_once(): Failed opening 'XXXXXXX/modules/views_row_insert/templates/views_row_insert.views.inc' for inclusion (include_path='.;C:\php\pear') in include_once() (line 574 of XXXXXXX\core\includes\theme.inc).
What I have tried:
- Uninstalling and reinstalling the module
- Running update.php and clearing the cache
- Replacing all the references to drupal_xxx to backdrop_xxx
- Placing a copy of 'views_row_insert.views.inc' in '/modules/views_row_insert/templates/' which didn't previously exist
- Putting the hook_autoload_info() function at the top of the .module file instead of the bottom
I've rejigged lots of superficial things but the outcome is the same... can anybody help?
Many thanks!
You need to rename your function from
to
Wherever you see hook, it is replaced by the module name.