Taxonomy filter term 147,122 vs 122,147 (There's a difference)

taite11 - March 20, 2009 - 16:17
Project:Taxonomy Filter
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:solotandem
Status:needs review
Description

I would like to be able to set which vocabulary's number shows up in which order. The reason is that we build custom URL aliases in the format "(term from vocab1)/(term from vocab2)" which correspond to (term # from vocab1),(term # from vocab 2). However, Taxonomy filter puts those two numbers the other way around so it leads users to a URL like taxonomy/term/147,122 instead of following the alias like we want it to. Know what I mean?

#1

styro - March 22, 2009 - 09:00
Status:active» won't fix

If you aren't using the tf_multi submodule, then the order does matter and it determines what the results of clicking on another term would be. ie the first term is the one you started with and the one that stays while the second one is the one that changes when you click another term. So for your example, you'd need some other way of saying that term 122 was the primary one if it was the one that stayed.

With tf_multi, I don't think the order matters. The API might allow you to write your own submodule to order them how you like when using tf_multi.

While I don't plan to add that kind of feature, I would look into any suggested API changes to support it being done in a submodule.

#2

solotandem - April 29, 2009 - 01:25
Assigned to:Anonymous» solotandem

Download tonight's dev release (see #447896: Change base menu template to display a refine search block and show the current search criteria) and post back whether this now works as you describe.

#3

taite11 - April 29, 2009 - 07:05

This is no longer an issue for me. I have a custom module that builds URLs in the form "term from vocab1"/"term from vocab2" or in any other combination of terms from various vocabs. With Taxonomy Filter it will work on 50% of cases - That is, on the ones that place the numbers in the "right" order it works but it doesn't work for the ones in which the terms are placed the other way around. So, for this, it would only be useful if I could actually choose the order.

But, if somebody is actually developing Taxonomy Filter again, I can come up with some more ideas pronto!

#4

solotandem - April 29, 2009 - 14:45

I want to make sure I understand your original post. Please confirm or clarify:

1) The order of the term ids does not affect the nodes displayed. In other words, the set of all nodes with '147,122' is the same as the set with '122,147' as set intersection is commutative.
2) The order of the term ids (reflecting the order selected by the user) affects the url display and the custom URL alias that applies.

Assuming both of the above, the dev release will respect the order in which the term ids are selected by the user in setting the url, but will display the same group of nodes in either case. (Do you have a different behavior in mind?) The base and cloud menu templates are supported. The other two (dynamic and context) still require some attention.

To your last remark, I will be developing this module and will consider your ideas.

#5

taite11 - April 29, 2009 - 16:03

I tried out the recent dev release and it messed up most pages. For example:
- breadcrumbs were showing in the middle of the page.
- some parts of the block itself were showing on the wrong part of the page.
- the taxonomy term page (a view) said "search results" at the top instead of its normal title.

I returned to the previous dev release and it was OK.

#6

solotandem - April 29, 2009 - 17:55
Status:won't fix» needs review

Sorry to hear about the messed up pages.

Would you post a link, an image, or equivalent of a typical messed up page? Also, indicate what modules are in play, what taxonomy filter options you are using, and other relevant details (e.g. using a view as you indicate) that would be useful to troubleshoot this.

#7

taite11 - April 29, 2009 - 19:07

I can't play around with it today as it is a live site. I'm going to setup a copy as a test site sometime this week and then I can put up this latest dev again.

I think there is about 100 modules installed, including custom modules and edited modules. It also has a custom theme.

#8

solotandem - May 12, 2009 - 05:29

Try tonight's dev release which includes several changes.

The current search criteria block (what you referred to as breadcrumbs showing in the middle of the page) is now optional. Several new configuration settings including the block titles (e.g. the previously hard-coded 'search results' caption).

You need to run update.php and should visit the settings pages.

#9

taite11 - June 1, 2009 - 22:01
Version:6.x-1.x-dev» 6.x-1.0

I'm using 6.x-1.0 now. I think this issue still remains.

As far as I can tell, it can only provide the IDs in one order. The process for selection is:
1 - Go to .../admin/settings/taxonomy_filter/mappings
2 - Click "edit" for the appropriate term which takes me to .../admin/settings/taxonomy_filter/mappings/8/edit
3 - Select the term desired and click "save settings"

So, as I'm only filtering one term by one other term, I can't use this for exactly 50% of scenarios because it will create the wrong URLs which is less than optimal for users and quite bad for search engines.

#10

solotandem - June 2, 2009 - 04:28

Glad to see your comment.

Please review my comment #4 above and reply to the questions posed. As I wrote, the module respects the order in which the term ids are selected by the user in setting the url. You seem to be saying the opposite. I can select term A followed by term B and have a URL like taxonomy/term/A,B. I can select in the opposite order to have a URL like taxonomy/term/B,A. You seem to be saying this does not work.

Also, your comment #9 seems to focus on the admin settings pages as part of the issue. I do not understand how the settings affects the URL in the way you describe.

#11

taite11 - June 2, 2009 - 05:24

#9 is a reply to #4. #5 to #8 were a side-issue.

In #9 I was saying that on the admin settings pages I don't see any way to select the way the termIDs are used to create the system path.

#12

solotandem - June 2, 2009 - 06:14

I don't see why the settings pages should affect the "system path." Do you agree that the user can select the terms in either order and the url generated reflects that order? But is your issue something other than this? You seemed to want to create a path alias dependent on the order of the terms. Is that correct?

In your original post, you wrote, "Taxonomy filter puts those two numbers the other way around so it leads users to a URL like taxonomy/term/147,122 instead of following the alias like we want it to." To me, the order in the url depends on the order selected by the user. Are you saying you want to be able to force the order in the url (regardless of order selected by the user) so that the url matches up with your custom path? And to do this, there should be an "order" parameter of some sort in the settings pages? If so, what constraints are placed on this order? For example, is the order based on vocabulary or something much more complicated?

#13

taite11 - June 2, 2009 - 14:46

Do you agree that the user can select the terms in either order and the url generated reflects that order? - If the user can do this, it is very bad for SEO, even if there is no URL alias. ..."147,122" and ..."122,147" will be different pages on search engines. This will lead to duplicate content and a splitting of the backlinks.

Are you saying you want to be able to force the order in the url (regardless of order selected by the user) so that the url matches up with your custom path? - Yes, to be specific, the order of the system path should be fixed.

And to do this, there should be an "order" parameter of some sort in the settings pages? - Yep, I suppose it has to be somewhere.

What constraints are placed on this order? - I suppose it would be set by vocabulary.

#14

supered - June 15, 2009 - 04:21

I was just looking for such a fix.

Just adding to taite11: yes, 147,122 and 122,147 would be different pages with duplicate content, too bad for SEO. However, there is a simpler approach to this kind of problem. We can have both pages, so long as we use rel=canonical tag.

I don't know if discussing this issue on this thread is appropriate, but as you have mentioned SEO, I think some sort of integration with pathauto and global redirect would be really useful. As a matter of fact, this is more of an issue related to those two modules than to taxonomy filter.

#15

jonnyp - July 6, 2009 - 16:38

I'm sorry, I disagree - there is no link to Global redirect or pathauto here, it is a problem that should be fixed within the tf_multi module.

The duplicate content issue is a serious problem, and using 301 redirects or tags that may only work with some search engines is not a proper fix but a kludge.

The best way to fix this is to set a standard for the order in which terms are placed in the path - i suggest it is written in order of size
eg terms 256 , 57 and 4 would always be written as
/taxonomy/term/4,57,256

If the terms are always displayed from low to high there is a standard that can be followed, the urls will always be identical and it is very easy to code.

#16

sgriffin - October 28, 2009 - 15:43

Is there an option for this yet for those who will have identical pages for x,y and y,x?

#17

solotandem - October 28, 2009 - 15:46

No. Which of the alternatives presented do you favor?

#18

sgriffin - October 28, 2009 - 16:22

Just a simple sort.
Doesn't really matter, since I assume they'd need to be hand aliased.
This would help in reducing dupe urls/page titles/content.
I imagine the "best" way to do it, would have some sort of UI to weight vocabularies which I believe they already have.
Next the highest term is by which term has the most children in the case of a multi select vocab.

 
 

Drupal is a registered trademark of Dries Buytaert.