no page defined - pageurl
See original GitHub issueFound a bug? Please fill out the sections below. 👍
Issue Summary
created new site, new homepage kept getting
File "/Users/rosscdh/.virtualenvs/glitter/lib/python3.6/site-packages/wagtail/wagtailcore/templatetags/wagtailcore_tags.py", line 31, in pageurl
return page.relative_url(current_site, request=context.get('request'))
AttributeError: 'NoneType' object has no attribute 'relative_url'
Have created a patch which seems to fix the issue: https://github.com/wagtail/wagtail/pull/4140
Steps to Reproduce
- standard start
- delete welcome page
- replace with new one (associated with a wagtailsites site that is default=True)
Technical details
- Python 3.6.0
- django Version: 1.11.8
- wagtail Version: 1.13.1
- Browser: irrelevant
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:15 (1 by maintainers)
Top Results From Across the Web
What is "page url not defined" in the Pages report? FAQ
If all your pages report “Page url not defined” then there is a data tracking problem. Here are common reasons for this issue:...
Read more >pageURL | Adobe Analytics
Override the automatically collected page URL on your site. ... This variable is not an available dimension in Analysis Workspace.
Read more >Page Path vs Page URL in Google Tag Manager
If you are trying to compare Page Path vs Page URL in Google Tag Manager, here's a quick guide that will give you...
Read more >About the different types of URLs - Google Ads Help
Ads you create using Google Ads have two URLs: a display URL and a landing page URL. With two URLs, you can show...
Read more >What Is a Website URL? The 3 Most Important Parts Explained
Fun fact: the URL you see right now in the address bar may or may not contain www. , which stands for world...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As far as I can tell, this is not a Wagtail bug - it’s a legitimate error message, being triggered by bakerydemo’s template code not guarding against users doing certain invalid things (for example, leaving out Hero CTA link on the homepage). Have now added a more meaningful error message for this in #4228.
I agree with you @gasman, this is a good thing that it raises an error, otherwise we would end up with dead links. However, I’m in favor of raising a more explicit error.