Hi there

Pretty Paths doesn't transform "node/123" into path aliases (Pathauto). I have a Views Block which is attached to a a group of nodes via Context module's conditionals. On those nodes, a facet filter is being used to allow further filtering of the Views Block's results.

When I turn off Pretty Paths, the alias shows up as expected. When I turn Pretty Paths on, "node/123" is displayed instead of "/my/node/alias".

Best regards,
Oliver

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dasjo’s picture

Status: Active » Needs review
FileSize
714 bytes

hi, thanks for reporting.

if i understand correctly, you are using facet filters for a block that shows on a view. thus, the base path in your case is the url of the node.
without pretty paths, the base path of the node gets aliases and facet filters apply like this: "/my/node/alias?filterA=A&filterB=B"
with pretty paths enabled, the base path of node doesn't get aliased: "/node/123/filter/A/filter/B"

the attached patch could fix this problem. let me know if that works

Anonymous’s picture

I applied the patch to beta2 and the path is being aliased correctly now ("/my/node/tags/tag-1"). But when I click on a link now, I get a 404 error. This is probably because the page doesn't expect additional arguments (unlike a Views page with a defined path) and thus looks for a matching path in the alias table, doesn't find any and chokes. Looks like this requires a special handler?

The site is multilingual and uses language prefixes. Not sure if that has anything to do with it.. probably not. I can post arrays/objects/variables, tell me what you need and I'll post it here.

dasjo’s picture

yes, this sounds right. you might want to try adding argument support to your node pages by using page manager, which is part of ctools.

the language prefixes shouldn't affect that, but who knows :)

Anonymous’s picture

Ah, page manager. Will give this a try. We learn something new everyday.. :-)

Thanks

dasjo’s picture

you are welcome.

if you have time, this could be a great cause to write a small documentation recipe. we don't have any documentation pages so far, but this could be a first step :)

Anonymous’s picture

Sure, I can give this a try. Need to figure out how this works first, I never wrote any documentation on d.o. before. I imagine there should be a general "start page" for the module, which then contains links to topics, like this use case? Right now I don't even know where to start, but I'm sure there's a documentation for creating documentations .. hidden .. somewhere .. :-)

dasjo’s picture

yep, i have added #1923208: Add documentation in that regards

checker’s picture

I getting into the same problem with taxnomy terms when using "Taxonomy term template" panel page. I guess it is not possible to prevent a 404 error here? (I'm using patch #1)

dasjo’s picture

#3 explains a way to prevent 404 errors

checker’s picture

I'm using page manager :) The problem is "Taxonomy term template" (built in) does not allow to modify path settings. I think it is the same problem for nodes if you are using "Node template" (built in).

dasjo’s picture

have you tried using this module to override existing pages?
http://drupal.org/project/pm_existing_pages

dasjo’s picture

Category: bug » feature
Status: Needs review » Postponed (maintainer needs more info)

please report back if the path alias replacement from patch #1 is needed and if you have success using page manager in the cases discussed above

Anonymous’s picture

Sorry for the late reply. Work is eating me up. :-P

I decided to not use Pretty Paths for this specific case because I couldn't get it to work with Page Manager after clicking around for half an hour. I never used Page Manager before and didn't had the time to properly dig into it and no RTFM yet, so.. FAIL on my side. The issue is still pending on my list tho, I will revisit this particular case once I get a bit of headroom at work.

NIKS_Artreaktor’s picture

Similar problem with alias of basepath.

http://drupal.org/node/1468922

And it is real problem.

Patch from #1 changing basepath with alias, but if apply facet - we will have 404 error.

dasjo’s picture

Title: Generates links without Pathauto URL alias on nodes » Add support for base path aliases

changing title to reflect the purpose of the patch in #1

dasjo’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Exploratus’s picture

I have the same problem with taxonomy term pages. As soon as I apply a facet, my taxonomy term pages become /taxonomy/term/*/facet category/facet - basically they lose pretty paths.

Basically, the taxonomy pages are not supporting pretty paths with facets.

Is this just me, or is this a global problem?

Thanks in advance.

Yoran Scholiers’s picture

Issue summary: View changes

Same problem here, paths get changed to node/nid instead.
Is there any sollution for this?

dasjo’s picture

there is a patch and some discussion, have you tried it?

Yoran Scholiers’s picture

The patch does exactly what it needs to do, thanks for that, but I can't find information on how to fix the 404 error by using Page Manager.
I realize that it has nothing to do with this module.

But still,...
Do I understand correctly that I have to create a panel page and pass the arguments?
I ask this because the site I'm working on is an existing site with a lot of different facet pages and changing all these pages is going to take a while.

dasjo’s picture

hi,

i just realized that it is not possible to support that use case just by applying the above patch.

you would need to set up path mappings for all aliases using page manager which isn't really a solution.

what you can though is have a look at #1468922: URL aliases require workaround

also see
http://drupal.stackexchange.com/questions/32731/passing-an-argument-to-a...

dasjo’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)