docpad-plugin-menu icon indicating copy to clipboard operation
docpad-plugin-menu copied to clipboard

Maximum call stack size exceeded.

Open mikeumus opened this issue 12 years ago • 5 comments

See: bevry/docpad/issues/692

mikeumus avatar Oct 31 '13 04:10 mikeumus

Specifically: https://github.com/bevry/docpad/issues/692#issuecomment-27450457

mikeumus avatar Oct 31 '13 04:10 mikeumus

I believe this message is caused by https://github.com/sergeche/docpad-plugin-menu/blob/master/src/menu.plugin.coffee#L45. This error seems to be caused due to sensitivity to an arbitrary sort order in the collection.

For example, if /foo/bar is processed first, then /foo will be generated automatically. If /foo is then processed afterward, the menu plugin will throw an "Item Duplicate" error.

That said, this error also seems to be handled incorrectly by Docpad, resulting in a incomprehensible error message.

ofShard avatar Nov 01 '13 00:11 ofShard

Happy Halloween! :+1:

mikeumus avatar Nov 01 '13 01:11 mikeumus

Early to tell but seems including menuOrder in child menu items invokes the error once more.

mikeumus avatar Nov 01 '13 23:11 mikeumus

Seems the Emmet Docs website uses menuOrder to organize it's child menu items:

  • https://github.com/emmetio/emmet-docs/blob/master/src/documents/abbreviations/syntax/index.html.md
  • http://docs.emmet.io/

mikeumus avatar Nov 02 '13 02:11 mikeumus