Problem/Motivation

The elaboration of a test for the breadcrumb_as_area feature has discovered some strange dead code paths in the hooks. Some major parts are not working and aren't covered by a functional test.

we should rework the chain of the hooks

  • etracker_preprocess_page
  • etracker_page_attachments_alter
  • _etracker_set_default_variables
  • _etracker_add_variable

especially the generation of the inline javascript variables is only working once.
Some code parts in the etracker_preprocess_page never has done any meaningful job.

Issue fork etracker-3605509

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sunlix created an issue. See original summary.

sunlix’s picture

Status: Active » Needs review

Okay, I think this is a nice simplification of the current hook code.
The following changes were made:

  • etracker_preprocess_page deleted without any replacement
  • etracker_page_attachments_alter moved to etracker_page_attachments
  • _etracker_set_default_variables deleted without any replacement
  • _etracker_add_variable</li> deleted without any replacement
  • etracker.api.php</li> deleted without any replacement

All tests are green.

I know that these changes could be handled as breaking change, but I think we have a tiny group of users and the most code path's were dead code path's with any impact on rendering.
So I will merge it..

sunlix’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • sunlix committed 149284cb on 8.x-3.x
    task: #3605509 Rework default_variable handling in .module
    
    By: sunlix