Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1071

Theme Templates are using the wrong hook

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.x-1.6, 7.x-1.7, 7.x-1.8, 7.x-1.9
    • Fix Version/s: 7.x-1.10
    • Component/s: None
    • Labels:
    • Sprint:
      Islandora 7.x-1.6 Sprint 01

      Description

      For example the theme islandora_default:

      https://github.com/Islandora/islandora/blob/a7c5a3516689c5963ddf043d7cd26a9c3e201943/islandora.module#L433-L437

      Is using the preprocess hook 'islandora_preprocess_islandora_default'

      https://github.com/Islandora/islandora/blob/a7c5a3516689c5963ddf043d7cd26a9c3e201943/theme/theme.inc#L113

      This isn't guarantee to run before other preprocess hooks should some other module want to override it.

      Instead we should be using 'template_preprocess_theme'

      https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme/7

      Quote:
      template_preprocess_HOOK(&$variables): Should be implemented by the module that registers the theme hook, to set up default variables.

      This ticket is to do a full audit of all the islandora modules and change them to use the correct preprocess hook.

        Attachments

          Activity

            People

            • Assignee:
              neilMader Neil Mader
              Reporter:
              nigelgbanks Nigel Banks
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day, 4 hours
                1d 4h
                Remaining:
                Remaining Estimate - 1 day, 4 hours
                1d 4h
                Logged:
                Time Spent - Not Specified
                Not Specified