Problem/Motivation

Getting error on Landing page creation. After saving, an error displayed that "The website encountered an unexpected error. Please try again later."

I have checked the error log. Here is the error message.

Referrer: /node/add/landing_page

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.core.layout". Did you mean one of these: "plugin.manager.condition", "plugin.manager.diff.layout", "plugin.manager.views.sort"? in Drupal\Component\DependencyInjection\Container->get() (line 157 of /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php).

User interface changes

N/A

API changes

N/A

Comments

syam.mohan created an issue. See original summary.

phenaproxima’s picture

This almost certainly means that the Layout Discovery module (from core) is not enabled. Try turning it on and trying again. If Layout Discovery is not enabled, just clear all caches (drush cr); rebuilding the container should fix it.

The weird part, though, is that it *should* have been enabled by Panels 4.x's update hook if you ran update.php, or by Panels itself when you installed Lightning. The fact that it wasn't is a bit concerning. Is this a new installation of Lightning, or an update?

Barring some kind of freak problem, the only reason that Panels would fail to turn Layout Discovery on is if Layout Plugin were not present in the code base. For this reason, Lightning includes Layout Plugin explicitly in 2.11, but does not actually use it for anything. So three things should be true for you in 2.11:

1) Layout Plugin should be available in profiles/lightning/modules/contrib;

2) Layout Plugin should NOT be installed;

3) Layout Discovery should be installed, and required by Panels, Panelizer, and Page Manager.

syammohanmp’s picture

I have disabled "Layout Plugin" and enabled "Layout Discovery". Now it's working perfectly.
Thank you @phenaproxima.

syammohanmp’s picture

Assigned: Unassigned » syammohanmp
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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