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.

Copy pages without revisions and metadata like first_published_at

See original GitHub issue

When creating a new page it is often easier to copy an existing page with similar content than starting from scratch. The current behaviour when copying a page has some drawbacks and feels more like cloning a page. Wagtail also copies all revisions and metadata specific to this page, like first_published_at.

For example if you then publish the page and order by first_published_at descending you’ll find the page next to the page it was copied from. Most of the time this is not the expected behaviour (at least from the authors perspective).

Perhaps it would be an idea to make copying of revisions and metadata (to be specified) optional? Or to be backwards compatible opt in to exclude this information?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
lb-commented, Nov 30, 2017

@gasman good call.

As we already ask if the user wants to publish copied page, how about:

  • When Publish copied page is ticked: Set the first_published_at as now.
  • When Publish copied page is unticked: Set the first_published_at to null as this is not yet published.

I think it is helpful having the page revision history attached to copies, I also don’t see a reason to remove them.

1reaction
lb-commented, Dec 6, 2017

@timorieber I probably should have done this before I started digging into this one but…

I have just tried to replicate the specific issue you mentioned and I cannot get it to do the same thing.

What version of Wagtail were/are you using that has this issue (with first_published_at and last_published_at being copied from the source page).

I have made copies of some pages in the bakerydemo app and they all update the publish dates accurately on copies. It looks like this was fixed around 1.11 but there are no release notes specific to this issue, some notes about how revision dates work though - http://docs.wagtail.io/en/v1.13.1/releases/1.11.html#other-features

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Collect, Copy and Move Data Without Changing its ...
Moving metadata: learn how to collect, copy and move files without accidentally changing its hidden (and extremely important) details about ...
Read more >
Content Management API | Contentful
Upon copying, all resources maintain their original metadata like sys.id or createdAt . All other resources are available on a space level only....
Read more >
Load more pagination in html webpage- Webscraping
I have seen a similar problem in stackoverflow, but that was for json. But looks like my url is in html. Inspecting the...
Read more >
How do paste without including tracked changes?
Split from this thread. I'm having the opposite issue. Would like to copy and paste a clean document, after performing track changes on...
Read more >
How To Save Changes Without Publishing In WordPress
Locate the live post or page you'd like to edit, and hover your mouse over it. You should see a new “Revisionize” option....
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