I am using the core blog module, and the subscriptions module. Subscriptions UI module is enabled, and adds a link to node $links called subscriptions-subscribe that adds a 'Subscribe' link to blog nodes. Everything works as expected until I rebuild this page as a panel.
As soon as I replace the standard blog node page with the node_view panel, and drop in a content pane for "Node being viewed" content (view mode = Full, links displayed), the 'Subscribe' link disapears from my node links - where all the others remain as intended.
I checked all the code inside the node_content plugin, but even though the node links are being returned properly, they are not being rendered on the page.
Comment | File | Size | Author |
---|---|---|---|
#26 | subscriptions-n1837084-26.patch | 1.47 KB | DamienMcKenna |
|
Comments
Comment #1
jenlamptonAs a follow up here, the problem seems to be that
$node->content['links']['node']
is not properly formed when the links are rendered via panels.By adding
#theme
and#attributes
to the$node->content['links']['node']
array, the links that subscriptions UI module added to the node get rendered correctly.I'm not sure if the problem is that subscriptions UI us trying to add it's link into
'node'
instead of creating it's own grouping of links, or if panels should always add the'node'
grouping so that other modules can add to it.Comment #2
jenlamptonOn further consideration, I think this is definately the fault of subscriptions module. The link should be added into it's own group. I made this change to my copy of the module (patch attached) and everything started working again for me.
Comment #4
salvisComment #5
salvis#2: subscriptions-fix_node_links-1837084-2.patch queued for re-testing.
Comment #7
salvisThis is contrib, not core: patches need to be relative to the module's directory.
Comment #8
jelo CreditAttribution: jelo commentedI just ran into this issue. I cannot get Subscriptions to work with Panels at all. I am surprised that this hasn't moved forward yet, given the large number of sites that use Panels. Anyway, I manually implemented the patch, but it did not make a difference...
Comment #8.0
jelo CreditAttribution: jelo commentedadd view mode and links
Comment #9
thomas1977 CreditAttribution: thomas1977 commentedUsing Panels here. Using Subscriptions seems to be a no go. BTW: I always use Panels for my projects.
I insert the Subscriptions interface into a panel region, but it just doesn't show up anywhere, regardless of logged in user role and whatever settings I make in the UI.
Best,
Thomas
Comment #10
wimberb CreditAttribution: wimberb commentedHas anyone come up with a solution for this? I just came across this problem when I redid my entire site to use Panels and all the subscription links disappeared.
Comment #11
sophiejones CreditAttribution: sophiejones commentedHello
I was looking for solution for another issue I have with subscription and came across this one. In regards to panel, if you want, you can switch to its block interface under its configuration page and add the block to your panel and it works fine.
My problem is that I want the fieldset to remain collapsed but it keeps open no matter what I do. but other than that, the block works perfectly in panels without a problem and you can find it under miscellaneous.
Hope that helps.
Comment #12
wimberb CreditAttribution: wimberb commentedI was able to get the Subscriptions link to show on nodes by creating a View set to display the "Rendered entity" at "Full content". Then adding the View to my Panels rather than the node itself.
Comment #13
salvisIt's too bad no one cares enough to fix the patch and test it...
(I don't have Panels.)
Comment #14
wimberb CreditAttribution: wimberb commented@salvis, I would happily work on fixing the problem if I had the first clue about coding. The only codes I know are the building codes. I design houses.
Comment #15
wouser CreditAttribution: wouser commented@salvis I created a rendered view for Full Content but got lost after that.
The only reason I have Panels enabled is for Display Suite Layouts (Brick). I could disable it otherwise.
Few questions from a newb to panels.
1) How did you associate the Subscriptions block with the View or Panel.
2) What other Panels Module do you have enabled to get this to work.
Thanks in advance.
Side Note Solution: I was able to bypass this issue with panels/subscriptions with our previous theme by setting up a custom field (with blocks) with Display Suite. I added the block to Nodes and Users. Once I switched to my new theme (Professional) it stopped working again. Maybe this will help someone else.
Comment #16
salvisI'm not using either of Panels or Display Suite, so I can't really help there -- sorry...
Comment #17
wouser CreditAttribution: wouser commentedI meant to direct this question at : wimberb
Comment #18
wimberb CreditAttribution: wimberb commented@wouser, I simply created a view to display the node. Then in Panels I added that view to the Content. I am attaching the exported View if you want to use it.
Comment #19
DamienMcKennaThe patch from #2 rerolled, and using the correct directory structure.
I haven't tested it yet ;)
Comment #20
salvisThe patch looks good — thank you, DamienMcKenna!
Those who have this issue, please test this patch...
This is in the original code, but I think it's not needed.
Looking at a blog node, I'm seeing #theme values like
'links__node__node'
,'links__node__blog'
, and'links__node__comment'
. Should we use'links__node__subscriptions'
?Comment #21
wouser CreditAttribution: wouser commentedPanels disabled, subscriptions show up.
As soon as I enable panels (with the above patch) it disappears still. Wiling to test any more possible solutions.
I am using Professional Theme, I use Panels for Display Suite, display of nodes.
Comment #22
salvisFrom #2
That's exactly what the patch does.
Could it be that Panels somehow filters/limits the link groups that it displays?
Comment #23
salvisComment #24
rooby CreditAttribution: rooby commentedI would vote yes for this.
theme_links() is used in so many places and it is often helpful to be able to theme more specific lists.
Comment #25
salvis#19 looks good except for #24, and that it's not actually working (#21)...
Comment #26
DamienMcKennaUpdated to use links__node__subscriptions.
Comment #28
DamienMcKennaThe tests failed because there are no tests, see #2645590: Ensure that simpletest job doesn't "fail" testing if no tests are present for more details.
Comment #29
salvisYeah, that is a pain. I've added a dummy test to get over this.
Does that mean we need to provide a theme function?
This won't help with #21, will it? What could be the problem there?
Comment #30
rooby CreditAttribution: rooby commentedNo it still uses the default links theme function, it just means you can override it with more granularity if you desire, instead of having to override all links and then try to work out which links you are styling by the content.
The double underscore is a delimiter, so it will look for these overrides in this order:
Comment #31
salvis@wouser (#21): It has been a long time, but would you care to try this?
Thanks for the explanation, rooby!
Comment #32
robladdish CreditAttribution: robladdish as a volunteer commentedBummer, we've run into this too in the latest drupal 7.x branch, brand new site. Subscriptions shows up on content types with no layout. Under manage display, there is no entry for Subscriptions which is it's own problem. Somehow it's magically added to the page.
As soon as we enable a layout (changed from none) to either Display Suite or Panels, then a single entry called "Subscriptions" shows up, but it doesn't seem to do anything and we lose all functionality. I tried many different layouts and still have the same problem.
It looks like the subscriptions ui code auto-adds a field group called subscriptions that we can't see, and has it closed by default. Inside it are all the possible subscription settings. Ideally, this field group should show up on the manage display listing so we can place it where we want and used advanced layouts with Display Suite, Panels, or other. It would also be useful to have more control over the contents of this field group. For simplicity, we might want to just enable the checkbox "subscribe to this content node" only and skip the rest of the complexity. Yeah, open source, if I want it I should code it, but just getting started in Drupal, so I'm not there, just trying to be clear and paint a vision of what it could look like to see if this is what others would expect too.
I tried patch #26, but it didn't help. Darn! If anyone else has other suggestions, it would be great. Every time we try this, it totally screws up our existing 20-30 fields, so it's a few hours work to test and then get it all back to working again ...
Any other ideas? Thanks for any help!
Comment #33
salvisSo, apparently, this is not working right yet...
Comment #34
NWOM CreditAttribution: NWOM commented#26 sadly still doesn't fix the issue. You can reproduce the problem in the following way (using Panels):
Comment #35
Harsikesa CreditAttribution: Harsikesa commentedany news on this?
I also having the same problem, can not add subscription link via panel.
Please.... help....
---Update---
Problem solved, i just need to change the visibility settings from: /admin/config/system/subscriptions
[Node form position]
from
Fieldset above node links (and comments)
changed to:
Fieldset in Subscriptions interface block (below the comments)