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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

broeker’s picture

I'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

mraichelson’s picture

Component: User interface » Code
Status: Active » Needs work

Same 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.

dsnopek’s picture

Issue summary: View changes
Priority: Normal » Major
Status: Needs work » Active

I'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!

pbuyle’s picture

fieldable_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 of hook_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 in fieldable_panels_panes_entity_info(), so it won't work for bundle provided in hook_entity_info().

pbuyle’s picture

The attached patch fixes fieldable_panels_panes_entity_info_alter() so it uses the correct path with the 'manage' part..

pbuyle’s picture

Status: Active » Needs review
DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs review » Fixed

While I couldn't reproduce the incorrect paths, the code was still incorrect. Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

temkin’s picture

Status: Closed (fixed) » Needs work

I'm still seeing this issue. If I go to admin/structure/fieldable-panels-panes/lawyers/fields, I see the same page as admin/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?

temkin’s picture

Update:

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?

mizage@gmail.com’s picture

I'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.

baldwinlouie’s picture

I too have ran into this issue. This patch is what I'm running and it looks like it should work.

DamienMcKenna’s picture

Status: Needs work » Needs review
Andrew Edwards’s picture

Thanks! #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

DamienMcKenna’s picture

  • DamienMcKenna committed 9e1dc5e on 7.x-1.x
    Issue #2233363 by DamienMcKenna: Added more test assertions to show that...
DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

zuernBernhard’s picture

Had the same problem here. The attached Patch helped.

DamienMcKenna’s picture

@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.

zuernBernhard’s picture

Hi DamienMcKenna ,

  • Drupal Core 7.43
  • CTools 7.x-1.9
  • Panels 7.x-3.5+22-dev
  • Panelizer 7.x-3.2-beta1+64-dev

Thats pretty up-to-date isn't it ?

jtjones23’s picture

Hi 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

carsonblack’s picture

Status: Closed (fixed) » Needs work
FileSize
18 KB
32.35 KB

I 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:
shows no fields

Here's what it looks like when you go to the path with the /manage part of the path:
shows the fields

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!

carsonblack’s picture

Here'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.

Status: Needs review » Needs work
DamienMcKenna’s picture

However if I load admin/structure/fieldable-panels-panes/fieldable_panels_pane/fields I get the list of fields added to the module's interface:

admin/structure/fieldable-panels-panes/fieldable_panels_pane/fields

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:

admin/structure/fieldable-panels-panes/fieldable_panels_pane/manage/fields

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.

DamienMcKenna’s picture

Status: Needs work » Postponed (maintainer needs more info)
FileSize
261.9 KB

@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
The menu item definition for the fields path

DamienMcKenna’s picture

Status: Postponed (maintainer needs more info) » Needs work
Related issues: +#2719039: Plan for Fieldable Panels Panes 7.x-1.11 release

I 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.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
5.11 KB

WIP, needed to upload it so I didn't loose the changes.

Status: Needs review » Needs work

The last submitted patch, 31: fpp-n2233363-31.patch, failed testing.

DamienMcKenna’s picture

FileSize
4.25 KB

Rerolled after #2778265: Fix tests in current codebase was committed.

DamienMcKenna’s picture

Status: Needs work » Needs review

The last submitted patch, 21: 2233363.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 33: fpp-n2233363-32.patch, failed testing.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
3.51 KB
3.8 KB
7 KB

Ah! I forgot to update the 'page arguments' and 'access arguments' placeholders. Should work now.

Status: Needs review » Needs work

The last submitted patch, 37: fpp-n2233363-37.patch, failed testing.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
8.66 KB
2.28 KB

I'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.

DamienMcKenna’s picture

Status: Needs review » Fixed

All tests are finally green, and the paths are now gone. Committed!

  • DamienMcKenna committed 38dfa8d on 7.x-1.x
    Issue #2233363 by DamienMcKenna: Removed some legacy paths that were...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.