Skip to content

theme_options filter isn't always triggered for exhibit themes #113

@michaelhagedon

Description

@michaelhagedon

Once I've saved an exhibit's theme configuration, I can no longer access the values via the theme_options filter. Omeka_Form_ThemeConfiguration::init() does call this filter via Theme::getOptions() if nothing has been saved, but Exhibit Builder never calls the filter if theme options have been loaded from the exhibits table.

Steps to reproduce

  1. Implement the theme_options filter in a plugin class like so:
protected $_filters = ['theme_options'];

public function filterThemeOptions($serializedOptions, $args)
{
    echo 'asdf';
    return $serializedOptions;
}
  1. Edit an exhibit, switch to another theme, and configure it.
  2. Notice the 'asdf' at the bottom of the page.
  3. Save the theme configuration form.
  4. Press Configure again.

Expected behavior

'asdf' should still be at the bottom of the page.

Actual behavior

'asdf' is not present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions