1

I am attempting to do a simple custom page redirect using page manager following the example from NodeOne.se videos on Page Manager. While the video works, my attempt does not and I can't see the difference other that the alias path I use.

The URL I want to intercept is specs/%spec so I have created a custom page with that URL. I have configured the page with one argument to interpret %spec as a taxonomy term ID.

Next I created a variant set to perform an HTML redirect (301) to the URL materials/%spec:name/facts (This URL will call a view). There are no selection rules so all content will pass. Thee are no contexts or relationships since the argument for the term name is already visible in the summary of contexts present.

My expectation is that a URL such as Example.com/specs/term1 should redirect the website display to the contents called by the view page /materials/%/facts using with term1 applied as a contextual filter giving me a URL of example.com/materials/term1/facts. Since the URL is passing the context to the view, I should not need to pass arguments through page manager/panels UI.

My result is when I enter the specs/term1 URL, the taxonomy page for that term is shown and the URL is not changed.

The only thing I can guess is that this does not work on aliases. Any ideas on why this fails anyone?

1 Answer 1

2

Yes panels will read the path alias. I have discovered two related reasons why this problem might be occurring.

  1. Many of my taxonomy terms are two words long. Panels does not have a provision (views does) to convert the spaces to dashes. The panel redirection variant is not reacting to the URL because it is looking for an argument that does not have dashes generated by %spec:name.

  2. I tried the same redirect using the panel provided by the system /taxonomy/term/%term and it succeeded in placing the redirect path in the URL, although the redirect did not work. This is because the term name had two words and was inserted with a space in it.

There are several LEARNING Points for me in this answer:

First, I discovered that the actual Drupal path to nodes and terms are fully interchangeable. I thought that if a URL was using an alias, I was restricted to working with the alias format. The ability of panels to intercept the Drupal name pattern taxonomy/term/%term out of the alias drove home to me the fact that Drupal sees them as exactly the same.

Second, When this problem arose, I thought too big, too fast. I suspected a bug in the module or a major misunderstanding of how the selections in the form connect to each other to generate the action of the panel variant. I have had similar problems using views, which also very a complex module. The problem turned out to be a minor, easily overlooked error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.