In upgrading from 6.x-1.14 to 6.x-1.15 of the Printer, email and PDF module I noticed that the list of links made by the module submenu tree disappears from the email option. Does anyone have any thoughts on what changed that would make this disappear?

Some notes:
-The links in the submenu tree or block did not previously work in the printer version, and I haven't been using the PDF part of the module to say otherwise.
-I upgraded using drush and after, "Executing print_update_6100" a very long list of updates is listed, though they appear to have updated successfully.
-I also tried the dev version and that did not solve the issue.

Thank you.

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

I am not familiar with the submenu tree module.. What's the content of this list of links that disappeared?

On the general case, the email version should be the same as the printer version (ditto for PDF), so if it didn't work before for print, but worked for email, then something was wrong with email and has now been fixed :)

But since I can't understand what the problem is, I'm not even sure there's a bug in here.

dman’s picture

Status: Postponed (maintainer needs more info) » Active

Ditto here. Looking into it now.
http://drupal.org/project/submenutree allows us to embed (titles or teasers of) menu children into parent pages.
eg

First guess is that submenutree inserts content into the body *based on the current menu path* and because the 'print' pages are not on the menu path, that extra local content is not added.

That would mean the fix (additional support) probably needs to happen in submenutree. print.module just generates the page it expects from that path. I don't think it would be fully appropriate for it to mimic the menu path just to support submenutree

dman’s picture

PS, I found that the expected link content was not appearing for me just on the printer-friendly preview page - /print/1058
Not even tried email yet.

dman’s picture

Project: Printer, email and PDF versions » Submenu Tree
Version: 6.x-1.15 » 7.x-2.x-dev
Category: bug » feature
Priority: Minor » Normal

Yeah, it's submenu tree that only chooses to show in 'full page' view mode. This is 'print' view mode, so it's self-excluding.

Interim patch here - though it probably needs to be a config option. And shifting to submenutree queue.

diff --git a/sites/all/modules/contrib/submenutree/submenutree.module b/sites/all/modules/contrib/submenutree/submenutree.module
index 7ca67a2..6c9e0cf 100644
--- a/sites/all/modules/contrib/submenutree/submenutree.module
+++ b/sites/all/modules/contrib/submenutree/submenutree.module
@@ -365,7 +365,7 @@ function submenutree_node_delete($node) {
  * Implements hook_node_view().
  */
 function submenutree_node_view($node, $view_mode, $langcode) {
-  if ($view_mode == 'full' && node_is_page($node) && (!empty($node->submenutree_enable) || !empty($node->siblingmenutree_enable))) {
+  if ((($view_mode == 'full' && node_is_page($node)) || $view_mode == 'print') && (!empty($node->submenutree_enable) || !empty($node->sibling
     $mlid = 0;
     // Other modules may override which mlid to use. Use the first available value.
     foreach (module_implements('submenutree_mlid') as $module) {
dman’s picture

Status: Active » Needs review
StatusFileSize
new2.77 KB

Here's a patch that allows submenutree to (optionally) show on 'print' pages.

It adds an option to toggle it (for print or any view_mode) to the submenutree settings

ivnish’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)