After updating to 7.x-1.11, the links to FPP pages in the admin menu do not work. Specifically, the urls for these pages are broken:

  • admin/structure/fieldable-panels-panes
  • admin/structure/fieldable-panels-panes/add
  • admin/structure/fieldable-panels-panes/settings

If I manually create urls to my custom panes, those work. Such as: admin/structure/fieldable-panels-panes/image_pane where the image_pane is my custom FPP.

In addition to the links not working, I am getting these notices all over the site:
Unable to load the "" Fieldable Panels Pane type.
Unable to load the panels_pane Fieldable Panels Pane type.

Cache clears and cron runs and usual suspects haven't helped with any of these oddities.

I'm also using Media Pane 7.x-1.1 and I can get to that page just fine from manually entering the url like I do for my custom FPPs: admin/structure/fieldable-panels-panes/media_pane.

Comments

potassiumchloride created an issue. See original summary.

dat deaf drupaler’s picture

Same here using 7.51 and 7.x-1.11... rolling back to 7.x-1.10

damienmckenna’s picture

@dat deaf drupaler: Are you using Media Pane too?

dat deaf drupaler’s picture

No @damienmckenna, I reverted back to 7.x-1.10 and was able to regain access to FPP settings pages.

damienmckenna’s picture

The three paths listed come from different locations and have different permissions:

  • admin/structure/fieldable-panels-panes - requires the 'administer fieldable panels panes' or 'access fieldable panels panes master list' permissions.
  • admin/structure/fieldable-panels-panes/add - requires the 'administer fieldable panels panes' permission.
  • admin/structure/fieldable-panels-panes/settings - requires the 'administer fieldable panels panes' permission.

Are you sure that the roles had these permissions?

potassiumchloride’s picture

Yes, I'm the site admin and I have "administer fieldable panels panes" permission, and I couldn't get to those pages.

dat deaf drupaler’s picture

I'm site admin as well and with all administering FPP permissions enabled, I can access all three settings page using 7.x-1.10 version.

Just tried again updating to 7.x-1.11 and clearing all caches, all these three pages crashes with "ERR_TOO_MANY_REDIRECTS". Nothing shows up in watchdog however I got bunches of "Unable to load the "" Fieldable Panels Pane type." in information green dialogue. Re-verified all permissions are enabled.

damienmckenna’s picture

Well fudge :-(

Could you please install the Devel module, load this page and tell me what it says for 'access_callback' and 'access_arguments': devel/menu/item?path=admin/structure/fieldable-panels-panes

sgdev’s picture

access_callback = fieldable_panels_panes_access_callback
access_arguments = a:2:{i:0;s:21:"fieldable_panels_pane";i:1;s:4:"list";}

I'm actually able to access the URLs referenced in the first post... I'm getting the "Unable to load the "view" Fieldable Panels Pane type" errors when trying to access the view, edit, or delete links for any fieldable panel pane. This is what I get when running the menu path through devel:

access_callback = fieldable_panels_panes_access
access_arguments = a:2:{i:0;s:6:"update";i:1;i:4;}

The problem I'm seeing is the $type passed in to fieldable_panels_pane_type_load is "view" instead of the fieldable panel pane name. I'm guessing one of the access arguments has gotten shifted and is passing in "view" rather than "%fieldable_panels_panes".

sgdev’s picture

Also I can confirm that rolling back to 7.x-1.10 fixes the issue of not being able to access the view, edit, and delete pages.

sgdev’s picture

Ok, I think I see the issue. Three menu paths were changed between 7.x-1.10 and 7.x-1.11. For each of these three, "manage" was removed from the path:

From this:

admin/structure/fieldable-panels-panes/manage/%fieldable_panels_pane_type
admin/structure/fieldable-panels-panes/manage/%fieldable_panels_pane_type/list
admin/structure/fieldable-panels-panes/manage/%fieldable_panels_pane_type/add

To this:

admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type
admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type/add
admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type/list

If I comment out the the first one admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type, I'm able to view/edit/delete existing fieldable panel panes.

The issue is that viewing, editing, and deleting fieldable panel panes matches the admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type menu path. The code is run first, throwing an error. There is no problem with the other two, because fieldable panel pane URLs don't have "add" or "list" in them.

What was the reason for removing "manage" from the menu paths?

sgdev’s picture

Referencing the issue where the paths were changed.

sgdev’s picture

I've found a possible fix.

By adding a 'weight' to the admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes legacy path of -11, it ensures that it occurs before admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type. This avoids the error.

I'll create a patch if this is an acceptable solution, thanks.

damienmckenna’s picture

@ron_s: That's a good idea, and it would explain why such a simple thing would cause such a major problem. How about we add a weight to 'admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type' so it's loaded after the others?

damienmckenna’s picture

Version: 7.x-1.11 » 7.x-1.x-dev
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new610 bytes

So, basically this.

sgdev’s picture

Status: Needs review » Needs work

Actually, I tested that approach first and it didn't work. There is some conflict that causes a higher weight on admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type to still act in the same way. I even tried 'weight' => 100 and still no difference.

The only way I was able to get it to work is to put a lower weight on admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes. Maybe because /view and /edit have weights on them already?

sgdev’s picture

Ok, this is bizarre... I just tried some other tests with weights, then reverted back to the setup that I said worked, and it's no longer working. Cleared cache multiple items and still not able to access.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new968 bytes

It shouldn't be 'admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes' that's causing the problem, it'd be 'admin/structure/fieldable-panels-panes', right?

damienmckenna’s picture

StatusFileSize
new1.21 KB

Maybe this?

damienmckenna’s picture

(yes, I'm throwing things at the wall hoping that something might fix it)

sgdev’s picture

StatusFileSize
new859 bytes

Re: #18, yes you're right it should be, but setting a higher weight wasn't working. After clearing my cache several times and running several tests, there is only one way I can get it to work correctly: comment out admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type entirely.

In every other situation, regardless of the weights (and also testing your patch), the first value for $type in fieldable_panels_pane_type_load is 'view', and every other time it is the bundle. 'view' is not bundle, it is the array(3) value of the path.

Is the load process (fieldable_panels_pane_type_load) ignoring weights? I was able to solve the problem by adding an elseif... not saying this is a good solution, but it does work. See attached.

maxplus’s picture

Hi,
I also have the same problem after upgrading from 7.x-1.10 to 7.x-1.11.
When using the patch from #21 my admin links are working again, thanks!

pol’s picture

Patch from #21 doesn't solve the problem here. Downgrading to 1.10.

sgdev’s picture

@Pol, are you getting any error messages? Also just to clarify, which paths are you unable to access? I'm wondering if this is two separate issues.

postovan dumitru’s picture

The patch at #21 doesn't work for me either. Unfortunately, I can't access the logs at the moment, will post some updates as soon as I get to set up a local environment.

Just to be precise, none of the paths from the admin menu are working for me.

However, I seem to be able to access the panes directly, by entering /admin/structure/fieldable-panels-panes/pane_machine_name.

sgdev’s picture

@Postovan Dumitru, just to confirm that you cleared your cache a couple of times before trying? System menus have to be rebuilt for the links to work.

arrow’s picture

Patch in #21 fixes the issue for me.

postovan dumitru’s picture

@ron_s, thanks for your concern, it seems I'm getting an empty $type value, not the "view".

Unable to load the "" Fieldable Panels Pane type.

I will work on my personal issue as soon as I get to work and post here.

Note: Yes, I have cleared my cache a dozen of times with not luck.

postovan dumitru’s picture

   // If bundle is not set and $type is 'view', return empty.
   elseif ($type == 'view' || $type == "") {
        return '';
  }

Adding a check for lack of a value did the trick for me (using the code from the patch).

Could someone include this and check? If not, I will attach the patch tomorrow. Cheers!

sgdev’s picture

@Postovan Dumitru, once you mentioned your error message in #28, I wondered if testing for empty value might work. Although wondering if it might be more comprehensive to actually test for an empty value?

   // If bundle is not set and $type is empty or 'view', return empty.
   elseif (empty($type) || $type == 'view') {
        return '';
  }

Also to the point made in #21, I'm still not sure this is the best solution... it does work, but the more fundamental problem (and I could be wrong) is it seems as though fieldable_panels_pane_type_load ignores menu weights.

postovan dumitru’s picture

StatusFileSize
new503 bytes

This one includes the empty value check.

@ron_s, you're absolutely right, this is not the fix we're looking for, but it's a temporary one, till someone figures out how to patch this up correctly.

I am going to see this through as soon as I get some spare time.

wilei’s picture

StatusFileSize
new506 bytes

We encountered this problem with our use case of FPP, and I did some deepdiving to this problem.

Patch provided in #31 works but causes notices from _menu_translate(), "Notice: Undefined offset: 4 in function _menu_translate()".

So I changed return value from empty string '' to FALSE and now it works, without notices.

ec-adam’s picture

#32 worked great for me!

pol’s picture

Status: Needs review » Reviewed & tested by the community

Patch #32 fixed the problem indeed.

Thanks!

arosboro’s picture

I'm confirming #32 works as others have noted above.

damienmckenna’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new628 bytes

So does this work too?

Status: Needs review » Needs work

The last submitted patch, 36: fieldable_panels_panes-n2826205-36.patch, failed testing.

sgdev’s picture

Comment in patch should be modified. It's still the same text I had in the original. Change from this:

// If bundle is not set and $type is 'view', return FALSE.

To this:

// If $type is empty or 'view', return FALSE.

Haven't tested the patch yet, but it makes sense to me.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new627 bytes

Good catch, thanks. Corrected the comment.

damienmckenna’s picture

Could someone who's experiencing this problem please let me know what arg(0) through maybe 5 or 6 are?

Status: Needs review » Needs work

The last submitted patch, 39: fieldable_panels_panes-n2826205-39.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review

The error is some sort of weird drupalci thing.

kmonty’s picture

Patch #39 worked for me.

damienmckenna’s picture

Bumping this request:

Could someone who's experiencing this problem please let me know what arg(0) through maybe 5 or 6 are?

nitebreed’s picture

@DamienMcKenna, this is the result of arg() when using fieldable_panels_pane_type_load():

Array
(
    [0] => admin
    [1] => structure
    [2] => fieldable-panels-panes
    [3] => view
    [4] => 4689
    [5] => translate
)

[5] can be anything like 'view', 'edit', or in my case 'translate'.
I can also confirm the latest patch works for me.

rudi teschner’s picture

Even with the patch in #39 I still have the issue that that the fieldable panels panes categories not listed in the admin menu.

I use the module 'admin source' to provide some custom lightweight menus to some roles and links to fpp categories that I manually add to these menus are also effected:

admin/structure/fieldable-panels-panes/fpp_titles_pane
admin/structure/fieldable-panels-panes/fpp_titles_pane/list.

arg():
Array
{
[0] => admin
[1] => structure
[2] => fieldable-panels-panes
[3] => fpp_titles_pane
[4] => list
}

edit:
Links like admin/structure/fieldable-panels-panes/view/34/edit work properly in the admin menu though, even without the patch.

damienmckenna’s picture

Out of interest could you please test #2848997: WSOD on "list" page for FPP types to see if that solves the problem? Thanks.

rudi teschner’s picture

@DamienMcKenna The patch in the other issue does not solve the problem for me, the behaviour is still the same.

vkakani’s picture

We are noticing the same issue as well, as soon we have updated to Version: 7.x-1.11 .
None of the Fieldable Panels Panes admin links work. It's happening on D7.41 as well as D7.54 versions.

Solution : #39 patch resolves the issue

sgdev’s picture

@DamienMcKenna, patch #39 works for us when viewing/editing fieldable panels panes or when viewing FPP admin pages:

Array
(
    [0] => admin
    [1] => structure
    [2] => fieldable-panels-panes
    [3] => view
    [4] => 10
    [5] => edit
)
Array
(
    [0] => admin
    [1] => structure
    [2] => fieldable-panels-panes
    [3] => general
    [4] => list
)
Bram Esposito’s picture

using Media Pane. Patch #39 works for me

dan.munn’s picture

Patch #39 works for me too.

manuel garcia’s picture

Just driving by here =)

+++ b/fieldable_panels_panes.module
@@ -611,6 +611,11 @@ function fieldable_panels_panes_panels_dashboard_blocks(&$vars) {
+  // If the type is not set or equals 'view', return FALSE.

Although the comment is technically correct, it doesn't explain why you want to return false when the if statement is true, can we think of something else that explains the reasoning to someone reading the code?

wylbur’s picture

The patch in #39 worked for us. We were not able to load the FPP admin view, and after the patch, all FPP's were accessible.

We are not using the media_pane module.

langelhc’s picture

Status: Needs review » Reviewed & tested by the community

Same here the patch #39 worked for me. I updated from 7.x-1.7 to 7.x-1.11. I was not able to load the FPP admin pages:

- admin/structure/fieldable-panels-panes
- admin/structure/fieldable-panels-panes/add
- admin/structure/fieldable-panels-panes/settings

smaz’s picture

+1 for the patch in #39 resolving the issue for me too. I was experiencing a redirect loop when trying to access the /admin/structure/fieldable-panels-panes path.

  • DamienMcKenna committed f1c1a0e on 7.x-1.x
    Issue #2826205 by DamienMcKenna, ron_s, Postovan Dumitru, wilei, dat...
damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #2825207: Plan for Fieldable Panels Panes 7.x-1.12 release

Committed. Thank you.

FYI I updated the comment to the following:

  // If the type is not set or equals 'view', return FALSE. This appears to be
  // caused by incorrect menu item ordering, but it is still unclear why it
  // happens.
  // @todo Work out the root cause of this happening.

Status: Fixed » Closed (fixed)

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