Closed (fixed)
Project:
Flag Page
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jan 2011 at 17:40 UTC
Updated:
12 Jan 2011 at 09:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
alexpottRemoving the get_link_type() function will stop the lazy creation of flag_pages which on large and busy sites could result in a heavy load on the database.
Comment #2
Ravi.J commentedOne way to deal with this is for flag_page to consume all menu paths that look like "flag/%/%" and provided by flag related modules.
$flag object has link_type attribute, and we can identify that link_type "flag_note_form" is being provided by flag_note module and once we have this information flag_page_flag_link can call hook_flag_link of flag_note module to create accurate "href" and "destination" attributes.
I am going to look into this a bit further and hopefully will be able to post a patch here.
Comment #3
Ravi.J commentedOne way to deal with this is for flag_page to consume all menu paths that look like "flag/%/%" and provided by flag related modules.
$flag object has link_type attribute, and we can identify that link_type "flag_note_form" is being provided by flag_note module and once we have this information flag_page_flag_link can call hook_flag_link of flag_note module to create accurate "href" and "destination" attributes.
I am going to look into this a bit further and hopefully will be able to post a patch here.
Comment #4
Ravi.J commentedI wrote this tin piece of code that goes into flag_page_flag_link() function , which seems to resolved the issue.
Below is how the function looks after the change
I don't see any load issues as a result of this fix.
Comment #5
Ravi.J commentedCleaned up code from above .. Patch attached
Comment #6
rickvug commentedSub. Can anyone with solid knowledge of flag review the approach? This seems to work but I'd want to make sure there are no adverse effects.
Comment #7
alexpottPatch in #5 doesn't save the page's title to the flag_page_data_url table. This would mean that the title field provided in the flag_page views integration won't work.
Patch attached fixes this issue by adding the title to flag_note's url for the flag_note form.
Still testing for further issues...
Comment #8
alexpottI've committed the code in #7 to 6.x-2.x-dev.
Will do a release once #1022818: Provide views integration with Flag note fields is fixed.