question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PathOverflow: Path Overflow from: '**********ZZZZ'

See original GitHub issue

Issue Summary

Creating a new page from the administration area raises a PathOverflow error.

PathOverflow: Path Overflow from: '000100020003ZZZZ'
  File "django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "wagtail/admin/urls/__init__.py", line 102, in wrapper
    return view_func(request, *args, **kwargs)
  File "wagtail/admin/decorators.py", line 34, in decorated_view
    return view_func(request, *args, **kwargs)
  File "wagtail/admin/views/pages.py", line 224, in create
    parent_page.add_child(instance=page)
  File "treebeard/mp_tree.py", line 1013, in add_child
    return MP_AddChildHandler(self, **kwargs).process()
  File "treebeard/mp_tree.py", line 387, in process
    newobj.path = self.node.get_last_child()._inc_path()
  File "treebeard/mp_tree.py", line 1114, in _inc_path
    raise PathOverflow(_("Path Overflow from: '%s'" % (self.path, )))

The only information I could find potentially regarding the issue was on SO at the following link: https://stackoverflow.com/questions/54166821/wagtail-pathoverflow-on-adding-new-child-page

There are only a handful of pages, so I’m not sure that particular issue applies though.

Steps to Reproduce

I haven’t been able to reproduce this myself, however a client has been seeing this behavior, which at the time I’ve just resolved by modifying the ZZZZ at the end to be numeric. I’m in the process of gathering some steps they may have taken to replicate it from this end (where they tried to add the page from)

  • I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: no

Technical details

  • Python version: 3.6.8
  • Django version: 2.1.4
  • Wagtail version: 2.4
  • Browser version: N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
tomdysoncommented, Sep 15, 2020

I would still insist that a more fundamental approach would be to eliminate preview w/o save function altogether

FWIW I would miss the ability to preview without saving. This is something I do quite often, e.g. when I’m demonstrating Wagtail, or testing new StreamField blocks. Without this feature, I’d have to remember to delete draft pages.

1reaction
gasmancommented, Sep 15, 2020

Thanks for investigating this further, @dany-nonstop and @chosak!

Even if this does turn out to be a result of custom code, I think setting the path to ZZZZ is probably enough of a “foot gun” that it’s worth avoiding that setup in Wagtail’s code. On further digging, it looks like the older implementation of preview (prior to #3383) actually had some code for setting the temporary path to current-maximum-plus-one instead:

https://github.com/wagtail/wagtail/blob/0d1c277e85c1ba3b73742811b9dd5d75a2493633/wagtail/wagtailadmin/views/pages.py#L609-L621

…however, I evidently failed to notice that this was being overwritten a few lines further down, and consequently this code was dropped as redundant in #3383. I think we should reinstate that version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

wagtail pathoverflow on adding new child page - Stack Overflow
To store a page's position in the page tree, Wagtail uses a technique called Materialized Path, which (in its standard settings) allows a ......
Read more >
[Solved]-wagtail pathoverflow on adding new child page-django
[Solved]-wagtail pathoverflow on adding new child page-django ... To store a page's position in the page tree, Wagtail uses a technique called Materialized...
Read more >
【Wagtail】PathOverflowの解決方法 - MarsQuai Blog
PathOverflow : Path Overflow from: '0001000200050004ZZZZ' ... StackTraceで指定されたパスは'0001000200050004ZZZZ'で最後のZZZZがオーバーフローしていることが ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found