Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'm creating a pdf and emailing it when someone clicks a button and I like to hide the invoked path from the end user as its no use to them
$pdf_content = module_invoke('print_pdf', 'generate_path', "node/{$node->nid}/example");
causes the browser to redirect off to that url because the menu_set_active_item
manipulates the $_GET['q']
So I've made a patch to return the path to what it was before when its finished manipulating it
Comment | File | Size | Author |
---|---|---|---|
#1 | print-use_of_menu_set_active_item_print_generate_path_causes_redirects.patch | 804 bytes | chrisns |
print-use_of_menu_set_active_item_print_generate_path_causes_redirects.patch | 753 bytes | chrisns | |
Comments
Comment #1
chrisns CreditAttribution: chrisns commentedappologies, working patch file attached