API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Path%21Al...

Hi,
When I try to open nodes that contains headings added by CKEditor, I got the following page :

Le site Web a rencontré une erreur inattendue. Veuillez essayer de nouveau plus tard.

InvalidArgumentException: Source path #first-heading has to start with a slash. in Drupal\Core\Path\AliasManager->getAliasByPath() (line 186 of core/lib/Drupal/Core/Path/AliasManager.php).

where first-heading is the name of the first heading I add to this node.

Nodes that do not contain headings added with CKEditor open perfectly fine.

As I have installed many modules, I'm not sure of what causes this error. But as I've installed Pathauto and modified some settings, this may be a problem with Pathauto ?

I'm using Drupal 8.2.1

Comments

Falcox created an issue. See original summary.

benelori’s picture

Assigned: Unassigned » benelori
benelori’s picture

I can't reproduce the issue, can you please offer some more detailed info?

benelori’s picture

Assigned: benelori » Unassigned
Falcox’s picture

Hi. Sorry for the delay in my answer. I found where the problem is, but not how to solve it. The error message disappear when I uncheck the option "display a table of contents" in Text and editors formats.

So I don't know if the problem comes from the TOC filter module, from the TOC API, or from the Path module...

Do you know how to solve this ?

Thx.

cilefen’s picture

I would move this to the TOC Filter project.

Falcox’s picture

Project: Drupal core » TOC filter
Version: 8.2.x-dev » 8.x-2.0-beta1
Component: path.module » Code