Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Provide new coders for Facet API Pretty Paths. Coder for dates without time and Coder for taxonomy without ID.
Check adapter url processor. Add new facet settings only for "pretty_paths" url processor.
Extended options: Add options select pretty path coder. Options for date coder.
Coder for dates better use with Facet API Date Popup Calendar (https://drupal.org/sandbox/uzlov/2160651).
Comment | File | Size | Author |
---|---|---|---|
#17 | facetapi_pretty_paths-pretty-path-coders-2160497-17.patch | 14.5 KB | uzlov |
Comments
Comment #1
uzlov CreditAttribution: uzlov commentedComment #2
dasjoHi,
Thanks a lot for your contribution! I'm on my mobile phone right now so can't really do an in-depth review atm.
The first question that I have though is, why would we need another taxonomy no-id coder? That should already be covered by the pathauto coder.
Regards
Comment #3
uzlov CreditAttribution: uzlov commentedComment #4
uzlov CreditAttribution: uzlov commented"Taxonomy no id" coder it's a little bit other coder than pathauto coder. This is coder used "term name" for parh alias, when this name unique in current vocabulary.
Comment #5
andypostWe using this modules in production so glad to see this bunch of fixes shipped with the module
Comment #6
dasjoi'm not yet convinced of introducing the "taxonomy no id" as it does almost the same as the pathauto coder.
maybe we should merge those into a single one with a setting on which strategy to choose from: a) just use the term name, b) use pathpauto if available.
note that there is also some work going on in #1981578: Allow to remove "Taxonomy Vocabulary" from urls.
besides my conceptual concerns, here's a quick code review:
typo
typo
quite some code duplication across the two if clauses
please respect coding standards:
// Decode to solr dates diapason.
also i have to admit that i haven't heard of diapason before and i a quick google on "solr date diapason" didn't lead to any meaningful results. does using something like "value" instead work?
code duplication across if statements
unnecessary empty line
Comment #7
uzlov CreditAttribution: uzlov commentedFixed code. Removed coder "taxonomy no id". Merged "taxonomy no id" functional with usual taxonomy coder (this is coder more likely).
Comment #8
uzlov CreditAttribution: uzlov commentedComment #9
rv0 CreditAttribution: rv0 commentedPatch addresses 2 issues:
- terms are displayed in urls with capitalization retained.
- pretty_paths_taxonomy_coder_strategy is not always set, so check for it.
I have the impression the code is still doing things to terms when it is not configured to do so?
My interdiff kinda failed (dunno why), but here's the relevant part:
you have my vote for the taxonomy functionality as provided by the patch.
Comment #10
dasjothe provided patches still include the "no id" coder, which i'd like to be solved by #1981578: Allow to remove "Taxonomy Vocabulary" from urls
i'd suggest turning this one into a stand-alone "dates coder" patch.
Comment #11
andypostand tests
Comment #12
dasjoandypost, was that comment intentional? not sure about the tag :)
Comment #13
andypost@dasjo I'm trying to follow facetapi 8 so just marked to check later. I found that few sites still using the patch #7, so maybe d8 version would be a different
Comment #14
uzlov CreditAttribution: uzlov at Skilld commentedUpdated patch to current state of branch 7.x-1.x.
Removed "no id" coder. For now stand-alone "dates coder" patch.
Added some little fixes (translation for delimiter of two dates etc).
@dasjo please check.
Comment #15
andypostComment #16
dasjohi andypost & uzlov,
thanks for getting this going again, your contribution is very much appreciated :)
i only have a few small remarks but it looks like we can get this in soon:
please make sure that indentation (spaces) are correct
can we remove that one?
could you add a comment, so that $arg['value] is expected to be like TIMESTAMP1_to_TIMESTAMP2
Is there a specific reason why only the date part without times is respected? Probably because you want to to be compact. We could add an optional setting so that aliases contain the time part as well?
Comment #17
uzlov CreditAttribution: uzlov at Skilld commentedRewrited coder-decoder, added time to path. Decided don't use one more settings options. Option for date (and time) format will be enough.
Comment #18
dasjothanks, looks good haven't tested it yet. adapting issue title
Comment #19
dasjo