According to the comment of ctools_set_page_token() callback tokens support the usage of arguments. Unfortunately ctools_set_callback_token() isn't argument aware.
A good example for that is the page element Page title - you can use this element multiple times on a page but only the settings of the last element are applied.
This is because, no matter how you configure the element, the used token is always <!-- ctools-page-title -->.
The attached patch changes the token creation to add a hash of the callback definition if the argument structure is used.

Comments

das-peter’s picture

An easy way to reproduce this issue is to place the page element Page Title twice on a page.
Configure the first "instance" to use the h1-tag, the second one to use the h2-tag.
Now if you view the page you'll recognize that both "instances" of the page title are displayed with the h2-tag.

das-peter’s picture

As suggested by merlinofchaos via IRC, patch changed to use md5() for performance reasons.

merlinofchaos’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)

I believe this needs a backport to D6. It may be as simple as cherry-pick but I would need someone to check.

japerry’s picture

Issue summary: View changes
Status: Patch (to be ported) » Closed (outdated)

Drupal 6 is no longer supported, closing.

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.