Some of the links on /admin/structure/fieldable-panels-panes
under "Operations" go to the incorrect URL. For example, the "Manage Fields" link goes to:
/admin/structure/fieldable-panels-panes/BUNDLE_NAME/add
(where BUNDLE_NAME is replaced with the bundle name)
Whereas it should go to:
/admin/structure/fieldable-panels-panes/manage/BUNDLE_NAME/add
(notice the additional "/manage/" in the URL)
This is true for the following links under "Operations":
- Manage Fields
- Manage Display
The rest of the links appear to be fine.
This only affects code in the latest Git - the last stable release was fine.
Original summary
When I try to edit the fields or the display for a bundle, I end up at the list of entities, meaning that i can't add fields to the bundle or edit the display.
So when I go to /admin/structure/fieldable-panels-panes/manage/fieldable-panels-pane/fields
I end up at /admin/structure/fieldable-panels-panes/manage/fieldable-panels-pane
I am using:
Drupal 7.26
fieldable_panel_panes 7.x-1.5+2-dev
ctools 7.x-1.4
Comment | File | Size | Author |
---|---|---|---|
#39 | fpp-n2233363-39.interdiff.txt | 2.28 KB | DamienMcKenna |
#39 | fpp-n2233363-39.patch | 8.66 KB | DamienMcKenna |
| |||
#26 | fieldable_panels_panes-manage-fields-paths-incorrect-2233363.26.patch | 829 bytes | carsonblack |
#21 | 2233363.patch | 938 bytes | zuernBernhard |
#17 | fieldable_panels_panes-n2233363-17.patch | 2.7 KB | DamienMcKenna |
|
Comments
Comment #1
broeker CreditAttribution: broeker commentedI'm not sure why, but we've also got this happening on a dev site:
admin/structure/fieldable-panels-panes/basic_file/fields
admin/structure/fieldable-panels-panes/basic_file/display
both of these links are redirecting to:
admin/structure/fieldable-panels-panes/basic_file
and we have no way to add or manage field displays.
7.x-1.5+11-dev
Comment #2
mraichelson CreditAttribution: mraichelson commentedSame issue here with 7.x-1.5+18-dev.
Accessing the path admin/structure/fieldable-panels-panes/pane_machine_name/fields returns the same page callback content as admin/structure/fieldable-panels-panes/pane_machine_name (a list of all instances of that pane type in the database).
It looks like some code was split up between an (existing) implementation of hook_admin_menu_map() and an implementation of hook_admin_menu_map_alter() was added between the current stable release (1.5) and the current dev snapshot. Not sure if something might have shifted out of place as part of that move.
But yeah, for the moment this seems to block users from editing the fields attached to an FPP type.
Comment #3
dsnopekI'm also seeing this issue in the latest Git. I've updated the issue summary to try and be a little clearer. Marking this as "Major" since adding configuring fields on FPPs is a fundamental feature!
Comment #4
pbuyle CreditAttribution: pbuyle commentedfieldable_panels_panes_entity_info()
define the['admin']['path']
of each bundle exported via CTools as'admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type'
.fieldable_panels_panes_entity_info_alter
contains code to fix bundle from implementation ofhook_entity_info()
using'admin/structure/fieldable-panels-panes/manage/%fieldable_panels_pane_type'
as admin path (as documented in the README.txt file) to'admin/structure/fieldable-panels-panes/manage/%fieldable_panels_pane_type'
.Links build in
fieldable_panels_pane::build_operations()
use the path as set infieldable_panels_panes_entity_info()
, so it won't work for bundle provided inhook_entity_info()
.Comment #5
pbuyle CreditAttribution: pbuyle commentedThe attached patch fixes
fieldable_panels_panes_entity_info_alter()
so it uses the correct path with the'manage'
part..Comment #6
pbuyle CreditAttribution: pbuyle commentedComment #7
DamienMcKennaComment #8
DamienMcKennaWhile I couldn't reproduce the incorrect paths, the code was still incorrect. Committed. Thanks!
Comment #11
temkin CreditAttribution: temkin as a volunteer commentedI'm still seeing this issue. If I go to
admin/structure/fieldable-panels-panes/lawyers/fields
, I see the same page asadmin/structure/fieldable-panels-panes/lawyers/list
, although I would expect a page where I can edit field settings. I checked and the patch from above is applied in my version.I'm using Panopoly distribution 7.x-1.25, Fieldable Panel Panes 7.x-1.6 and ctools 7.x-1.7.
Does anyone else see this issue?
Comment #12
temkin CreditAttribution: temkin as a volunteer commentedUpdate:
I've just manually changed URL from
admin/structure/fieldable-panels-panes/lawyers/fields
to
admin/structure/fieldable-panels-panes/manage/lawyers/fields
(notice manage in a second case), and it worked for me - opened field settings page. It contradicts with previous messages in this thread. Can you guys please take a look?
Comment #13
mizage@gmail.com CreditAttribution: mizage@gmail.com commentedI'm seeing the same behavior. Panopoly 7.x-1.24, Fieldable Panel Panes 7.x-1.6 and ctools 7.x-1.7. Temkin's solution works for me.
Comment #14
baldwinlouie CreditAttribution: baldwinlouie commentedI too have ran into this issue. This patch is what I'm running and it looks like it should work.
Comment #15
DamienMcKennaComment #16
Andrew Edwards CreditAttribution: Andrew Edwards commentedThanks! #14 works for me and looks sensible. I've created a task to place this patch in Panopoly Core #2629628: Fieldable Panels Panes - Manage Fields and display Link does not work
Comment #17
DamienMcKennaThis patch shows that the bug does not exist.
Comment #19
DamienMcKennaCommitted.
Comment #21
zuernBernhard CreditAttribution: zuernBernhard as a volunteer and at UEBERBIT GmbH commentedHad the same problem here. The attached Patch helped.
Comment #22
DamienMcKenna@zuernBerhard: Are you using an old version of CTools, Panels or Drupal core? The problem you mention should not exist, from what I can see, so something is causing the paths to be incorrect.
Comment #23
zuernBernhard CreditAttribution: zuernBernhard as a volunteer and at UEBERBIT GmbH commentedHi DamienMcKenna ,
Thats pretty up-to-date isn't it ?
Comment #24
jtjones23 CreditAttribution: jtjones23 commentedHi DamienMcKenna ,
Still having the same issue with:
Drupal Core 7.44
CTools 7.x-1.9
Panels 7.x-3.5
Panelizer 7.x-3.1
FPP 7.x-1.10
Comment #25
carsonblack CreditAttribution: carsonblack commentedI think there is a bit of miscommunication on this issue.
@DamienMcKenna The issue is not that the path does not exist, it does, and your test checking for a 200 will pass, it is that the path takes you to a screen that will not show your fields even though you have some.
I am running the exact same versions as jtjones23.
Here's what it looks like when you go to the path without the /manage part of the path:
Here's what it looks like when you go to the path with the /manage part of the path:
So yes, I have fields but using any of the FPP navigation it acts like I do not. And it does not result in a 404, so the test checking for the path will pass but will be displaying erroneous information regarding the existence of fields.
Manage Display also has this problem.
The patch in comment #14 no longer applies cleanly, it's off by 1 line.
Thanks!
Comment #26
carsonblack CreditAttribution: carsonblack commentedHere's a new patch that changes the incorrect paths.
NOTE: this patch only applies to the links in the operation drop-down, not the tabs for Manage Field and Manage Display when you go to /admin/structure/fieldable-panels-panes/BUNDLE/list. Those would still be broken and will require a change to how the field_admin_path function works in the fieldable_panels_pane class.
Comment #28
DamienMcKennaHowever if I load admin/structure/fieldable-panels-panes/fieldable_panels_pane/fields I get the list of fields added to the module's interface:
but if I go to admin/structure/fieldable-panels-panes/fieldable_panels_pane/manage/fields I get a list of entities for this FPP bundle:
because the menu path fails back to the admin/structure/fieldable-panels-panes/fieldable_panels_pane handler.
These are confirmed by the existing tests.
There has to be something else interfering with this.
Comment #29
DamienMcKenna@carsonblack: There isn't a problem of miscommunication. In tests/fpp.permissions.test, line 83 confirms that the title field is displayed in the list of fields on the /fields page, line 87 confirms the display settings page loads correctly on the /display page, and the tests on line 92 and 96 confirm that the /manage pages fall through to showing the default entities list.
So something is changing the paths on your site.
What I suggest you do is enable the Devel module and use the Development -> Menu Item path to see what is controlling the paths on your system, e.g.:
devel/menu/item?path=admin/structure/fieldable-panels-panes/fieldable_panels_pane/fields
Comment #30
DamienMcKennaI thought I'd done this already, but I checked through the codebase and there are paths that refer to e.g. "fieldable-panels-panes/manage/%fieldable_panels_pane_type". Why some people are seeing the disconnected but others (and the tests) are not is very confusing.
So I am sorry, you were right that there are paths like that in the module. I'll work on sorting it out for the next release.
Comment #31
DamienMcKennaWIP, needed to upload it so I didn't loose the changes.
Comment #33
DamienMcKennaRerolled after #2778265: Fix tests in current codebase was committed.
Comment #34
DamienMcKennaComment #37
DamienMcKennaAh! I forgot to update the 'page arguments' and 'access arguments' placeholders. Should work now.
Comment #39
DamienMcKennaI've added some logic to fieldable_panels_pane_type_load() to handle scenarios where the FPP type is either empty or comes through as the string 'manage', in these scenarios it redirects to other paths.
Comment #40
DamienMcKennaAll tests are finally green, and the paths are now gone. Committed!