omeka / omeka/plugin-ExhibitBuilder

theme_options filter isn't always triggered for exhibit themes

Open
#113 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
25
Forks
37
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Omeka_Form_ThemeConfiguration::init() and Theme::getOptions(), then trace how Exhibit Builder loads saved theme options from the exhibits table. Reproduce the configuration flow described in the issue and verify that theme_options is invoked both before and after saving configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.