Closed (fixed)
Project:
Re: Comment subjects
Version:
6.x-2.x-dev
Component:
Token support
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 Jan 2010 at 11:12 UTC
Updated:
3 Feb 2010 at 18:09 UTC
Jump to comment: Most recent file
Comments
Comment #1
arhak commentedthis would be critical
but, what caused it? conflict with another module?
how could I reproduce it?
the weight is not a critical issue regarding this module, it is set to 20 to be above token module (which has 10) just in case there is function
theme_token_listalready declarednote: that function doesn't exists in token module (AFAIK), but is proposed as a patch, so it might appear some day and brake if comment_subject executes before token
right now I can't see another strong reason for the weight other that
form_alterassigning the#default_valueto subjects, which might be broken if another module jumps in an try some tweaks, or... can't figure now another wayComment #2
arhak commentedI can't reproduce it
what other modules are involved?
can you reproduce it on a fresh install and provide the steps to follow?
Comment #3
skizzo commentedBy trial and error I narrowed it down to some sort of interaction with custom_breadcrumbs (6.x-2.0-beta2) . I then set the module's weight back to 20 and now I can reproduce the malfunction by just enabling custom_breadcrumbs (base module only, no need to configure any breadcrumb). In my original setup custom_breadcrumbs_paths and custom_breadcrumbs_views were also configured.
Comment #4
arhak commentedI'll download the latest version of custom_breadcrumbs and check this conflict
Comment #5
arhak commented@#3 BTW, which version of custom_breadcrumbs? 6.x-1.5 or 6.x-2.0-beta2 ?
Comment #6
arhak commented@#5 should be 6.x-2.x branch, which is the one with sub-modules
Comment #7
arhak commentedstill can't reproduce it
- enabled custom_breadcrumbs 6.x-2.0-beta2 and no problem
- cleared the cache (to avoid cached forms) and no problem
- enabled "Custom Breadcrumbs for Paths", cleared the cache and no problem
- manually set weight=12 for
custom_breadcrumbsat{system}table and no problem (details bellow)reviewing the code I can't find custom_breadcrumbs setting its weight
but the
custom_breadcrumbs_update_3states:that's why I manually set its weight to 12 for testing (it was 0 on fresh install) and though couldn't reproduce the error
this weight problem, should be found and properly fixed,
in the meantime, lets say comment_subject might happily use weight=11 (which is greater than token and less than custom_breadcrumbs), also, I consider custom_breadcrumbs using 12 is a narrow margin (maybe they should increase that weight), since token has 10
yet, I can't take any certain action, since I haven't been able to reproduce it
Comment #8
skizzo commentedFollowing your note I set custom_breadcrumbs to 12. With the following weighting I still see the problem:
Token replacement is back to normal with:
I settled with the same weights of your test (btw, I have no other module in the 11-13 range)
Comment #9
arhak commentedcould you please provide every configuration you have related to custom_breadcrumbs or its sub-modules?
I need to reproduce this error to be able to figure out what would be the real fix
Comment #10
arhak commentedfollow up issues:
#680934: module weight is no set on fresh install
#680936: increase module weight (12 is too low)
nevertheless I have to hit this error
Comment #11
MGN commentedI think this may be related to #543506: Problem with tokens when using a custom_bredcrumbs_paths. I'll have to look at the comment subject code to be sure. But if this is the case, once tokens issues a new release we should be able to fix this problem....
Comment #12
arhak commented@MGN
thanks a lot for getting involved, that might be the reason why I haven't been able to reproduce this error
we actually have a
token_replace($str, 'comment', $comment);which might be conflicting with custom_breadcrumbs due to token cache@skizzo
I've never tried custom_breadcrumb_paths nor custom_breadcrumb_views
having your configuration would help me to hit this error
Comment #13
skizzo commentedA) in admin/settings/custom-breadcrumbs all defaults, barring:
YES Set the home breadcrumb text on all pages
YES Use wildcard pattern matching in paths
B) THREE PATH BREADCRUMBS:
Name: search/user
Specific Path: search/user
Titles: Community
Paths: userview/directory
Name: users/* Pathauto for users is set to: users/[user-raw]
Specific Path: users/*
Titles: Community
Titles: Search user
Paths: userview/directory
Paths: search/user
Name: userview/directory userview is a table view listing profile nodes
Specific Path: userview/directory
Titles: Search user
Paths: search/user
C) TWO VIEWS BREADCRUMBS one and two are tabs for userview
Name: userview/directory/two
Views Path: userview/directory/two
Titles: Search user
Paths: search/user
Name: userview/directory/one
Views Path: userview/directory/one
Titles: Search user
Paths: search/user
Comment #14
arhak commented@MGN http://drupal.org/node/543506#comment-2460544
just with
token_replace_multiple?this module uses
token_replace, but not_multipleComment #15
arhak commented@#14 the flushing cache problem affects token_replace as well, but I can't be sure that it is the cause, since I'm blind yet (haven't reproduce it)
Comment #16
arhak commentedgood news!!
I've got it!
I reproduced this bug (wow, tough hunting)
thanks MGN for you insight
thanks skizzo for your patience
details & fix coming soon
Comment #17
arhak commented@skizzo just to confirm
which tokens where you using and notice the missing replacements?
Comment #18
skizzo commented[comment-auto-numbering]
[comment-parent-auto-numbering]
Comment #19
arhak commentedhow to reproduce this bug (thanks for the clue MGN):
- fresh Drupal 6.15
- comment_subject 6.x-2.0-alpha2
- custom_breadcrumbs 6.x-2.0-beta2
- enable custom_breadcrumbs_paths as well
- token 6.x-1.12
- admin/settings/custom-breadcrumbs
--- check "Use wildcard pattern matching in paths" and save
- admin/build/custom_breadcrumbs/path/add
--- Specific Path: comment/reply/*
--- Titles: Original post
--- Paths: node/[comment-nid]
- create a story (node/1)
- create a comment replying to that story (node/1#comment-1)
- reply to the previous comment (comment/reply/1/1)
- on that path subject appears broken (tokens weren't replaced)
a quick test to check if it is due to custom_breadcrumbs (thanks for the clue skizzo):
- change the weight of custom_breadcrumbs_paths to something above 20 (the greatest the better to discard any other module with tokens being affected by this)
---
UPDATE `system` SET `weight` = '100' WHERE `filename` LIKE '%/custom_breadcrumbs_paths.module';more technical details about why is this happening: #543506-4: Problem with tokens when using a custom_bredcrumbs_paths
the final solution:
- the cause is located
- a possible fix is to move hooks
token_value&token_listinsidecomment_subject.moduleinstead of a separated file (currently atcomment_subject.token.inc)- but I'll wait until getting in touch with other developers to check if this is actually a bug of comment_subject #681938: document proper practice for mymodule.token.inc files
Comment #20
arhak commenteda patch for custom_breadcrumbs is available at #627792-8: Custom Breadcrumb option causes Access Denied in OG Forums
it seems to solve this issue, but can't say if every other cb functionality remains working, its maintainer is asking for users testing that patch
this issue will remain postponed, since policy about
*.token.incfiles is now in D7 core, therefore there shouldn't be any requirement to include those hooks into the*.modulefileComment #21
arhak commentedno longer an issue of this module
details at #543506-4: Problem with tokens when using a custom_bredcrumbs_paths, and patch at #627792-8: Custom Breadcrumb option causes Access Denied in OG Forums was committed to custom_breadcrumbs HEAD and seems to fix this incompatibily problem (according to skizzo's feedback through mail)
Comment #22
arhak commentedthis will get into next 6.x-2.x release
Comment #23
arhak commentedcommitted to head (proposed 6.x-2.0-beta1)
Comment #24
arhak commentedclearing the issue queue
(this was more kind of reminder)
this issue was troubleshooted directly with the user, plus custom_breadcrumbs got updated to avoid nasty hook_init, plus dev already avoids this