Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For at least one month, the booking formlet no longer appears on panel page. It's OK on the standard node page. A problem of compatibility with the Panels module?
Comments
Comment #1
fietserwinI've never used panels, so I can't help you by diving into the problem. It is a field, so I would not expect any problems.
Can you debug functions availability_calendar_booking_formlet_field_formatter_view_inc() and availability_calendar_booking_formlet_form_inc() (in file availability_calendar_booking_formlet.inc) to see if they are executed and do return some output?
Comment #2
Pycouz CreditAttribution: Pycouz commentedThanks for your answer. I don't know what do you expect, I have never debugged a Drupal module. How can I do that?
I can reproduce the bug on a fresh standard Drupal install with ctools, panels and availability_calendars modules installed. I create a new type of content with calendar and formlet fields inside. I create a node and all is OK. Body, calendar and formlet appear. If I overridden the default node system page with page_manager (admin/structure/pages) and body, calendar and formlet fields added, the bug appears. Body and calendar are displayed, not the formlet.
Comment #3
Pycouz CreditAttribution: Pycouz commentedIt seems to be related with CTools. I have created a bug report: https://www.drupal.org/node/2460113
Any help?
Comment #4
astringer CreditAttribution: astringer as a volunteer commentedI ran into this issue when I was checking out the module. I'm planning on implementing as a entity, so it doesn't have implications for my current project. But to help improve the module and for anyone who runs into this issue and wants a way around it.
(Dev notes below the work around)
WORK AROUND (assuming you set up the calendar/booking formlet as fields on a node):
DEV NOTES
On a panelized node/full page override: (So essentially on the node page -- but a panelized version of it).
The calendar displayed, but no formlet (and the option color wasn't marked on the calendar when clicked).
The warning: ctools_entity_field_content_type_admin_title: Context is missing for field: node:field_availability_calendar
So for the heck of it I add a relationship on the node to the calendar (that is a field on the node). I also tried to add a context for the calendar, but wasn't able to (which makes sense).
But after adding the relationship I got this message: Notice: Undefined index: access callback in ctools_entity_from_field_context() (line 188 of *** ctools/plugins/relationships/entity_from_field.inc).
Fixing this is not in my skill set but I am happy to provide any additional information or testing that would be helpful.
Comment #5
Pycouz CreditAttribution: Pycouz commentedThank you astringer for your help! I'm not alone on Earth :)
Your workaround works well. I hope that module's developers will take your investigation into account.
Comment #6
fietserwinProvide a patch and I am all yours.
Comment #7
astringer CreditAttribution: astringer as a volunteer commentedI will try to provide a patch, it will probably take me some time -- but I'm trying to expand my skill set in that area. I'm not so familiar with the under pinnings of panels to understand, without some research, why it doesn't work when placed as fields. But I've run into this issue before with another contrib module (which is why I knew the view would work). I suspect this isn't an uncommon problem integrating with panels and panelizer.
Comment #8
fietserwinI am currently going through the issue queue and am closing old issues that have not had any response since long. Please feel free to reopen if you are still experiencing the problems, providing as much of the requested details as possible.
Note: Looking at the "Notice: Undefined index: access callback in ctools_entity_from_field_context()" I see it is now (ctools version 7.x-1.15) protected by a check if that entry is there at all in the array, so that should be gone now.
Note2: I do not have the time to dive into panels, so I am not going to solve this, even if it can be confirmed to be still there. I need a patch or clear instructions on what to change.