A WordPress plugin for staging revisions or variations of published content.
Official add-ons can be found at Revisionize.pro.
A Wordpress plugin for staging revisions or variations of published content.
License: GNU General Public License v3.0
A WordPress plugin for staging revisions or variations of published content.
Official add-ons can be found at Revisionize.pro.
I am using Revisionize together with ACF and FacetWP. I have noticed that when I publish a post that has ACF fields that are indexed by FacetWP, the facet is not updating. After a bit of digging, it looks like the cause is that ACF caches the values for its fields but in the way that these fields are copied from the revision to the original, the ACF cache is not updated.
Steps to reproduce
add_action( 'revisionize_after_publish', function( $post_id ) {
echo '<p>get_field: ' . get_field( 'test', $post_id ) . '<br>';
echo 'get_post_meta: ' . get_post_meta( $post_id, 'test', true ) .'</p>';
wp_die();
});
Expected result
Both the get_field and get_post_meta return the new value
Actual result
Only get_post_meta returns the new value whilst get_field returns the old value.
Lines 286 and 291 are calling $_GET['page']
without checks for isset
or !empty
.
Warning: require_once(/home/langone/public_html/wp-content/plugins/revisionize/settings.php): failed to open stream: No such file or directory in /home/langone/public_html/wp-content/plugins/revisionize/revisionize.php on line 34
Fatal error: require_once(): Failed opening required '/home/langone/public_html/wp-content/plugins/revisionize/settings.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/langone/public_html/wp-content/plugins/revisionize/revisionize.php on line 34
Steps to reproduce on my end.
I have deactivated all other plugins, and retried these steps to the same error. This is on a go-daddy dedicated server. Let me know if I can help in any way, if you would like a temp login to reproduce the issue. I use this site to test things so there will be no issues if you need to use it to troubleshoot.
After fixing issue #9 post dates are not updated anymore by default. For us this has the implication that post that received a update will not appear in our daily updated feeds section anymore.
Can we have a filter to turn on/off this behaviour.
I'm happy to send a PR please let me know
I am using Wordpress 5.1.1 with the new block editor. Iam clicking in the Revisionize link of a page in the page list. Then I edited and saved as draft multiple times [ here I observed that the slug was totally different (historico-do-sema) compared with the original (sema-historico) ]. Then I tryed to publish. Nothing happened with the sema-historico page. The page just publish it self as other page tith historico-do-sema slug.
I don't know whether this is an expected behaviour or not, the scheduled update first publishes draft revision, copies it to original and then deletes the revision draft. Although it seems like a legit solution to the problem, here are the number of unexpected behaviour this causes:
While using Jetpack's Publicize feature, this causes the revision (published post for a very short interval) to be posted in social media accounts, which of course, causes 404 error as the post will be deleted as soon as it is copied to original post.
If Onesignal Web Push Notification is active, the revision (published post for a very short interval) will fire a push notification, which will also send subscribers the link to the revision post causing 404 error.
Likewise, any other Plugins using post status transition hooks might get affected, especially if they are used to perform some action when the post gets published.
Would it be possible to have a filter where we can set an alternative plugin root for the revision addons. The problem we currently having is that our plugins are not versioned but get installed from a composer repository. After every deploy the plugins get scrapped and reinstalled. Having the addons folder inside of the plugin folder would lead to changes in our deployment process where we have to copy over the files every time.
Just want to know what your view on the topic is before I provide a pull request.
Currently the get_current_post_type
function doesn't get the nav_menu_item post type and throws an error when visiting the nav-menus.php page.
You could add, which would allow that post type to be ignored (or add that as a default type to ignore):
else if ($pagenow == 'nav-menus.php') {
$type = 'nav_menu_item';
}
In the post edit screen, the revisonise button simply has a class of 'button'. It would be good to have a unique class for revisionise also on the button to ease styling. Happy to submit a PR if this would help.
Once you create a revision of a page, make changes, then publish that revision. Should, or can, the revision be deleted automatically? That's not currently happening for me. The revision is still within Pages as a Draft.
Ideally, once you publish the revision, it replaces the original and then the revision itself gets removed from the pages.
We have our instance of revisionize setup to allow contributors to submit revisions a particular post. We setup a new capability called create_revisions that we're assigning to most roles and filtered revisionize_user_can_revisionize
.
However, when someone with publish_posts
publishes the post, an error occurs because the call to get_latest_wp_revision
returns null because wp_get_post_revisions
assumes the 'revision' status and not pending
. Then it is used directly in is_wp_revision_different
assuming it's an object. It creates a waterfall of errors including not deleting the revision.
![image](https://user-images.githubusercontent.com/1686106/39539188-d9c42976-4df3-11e8-90e4-d6aff22d132d.png
The errors subside after modifying line 236 to the following:
if ( is_object($revision_before) && is_object($revision_after) && is_wp_revision_different($revision_before, $revision_after)) {
I know we may be using it a bit custom, but this check would help with many use cases I believe for advanced publishing flows.
We might want to make this a setting (more work), or do the fix by default and use a filter to allow devs to override.
I can see a use where adding the ability to show/hide Backup Revisions and/or Draft/Future Revisions could be useful. Thoughts?
Hi, we use your plugin and it is quite useful most of the times.
However there are some custom post types that we'd like to exclude from the revisionize feature, because sometimes we click it by mistake and then have problems.
Example: WooCommerce coupons which are also custom post types.
Please allow developers to exclude custom post types by a filter.
Thank you.
Is this still maintained?
Result: The revision is published, but the ACF fields aren't.
Reason: transition_post_status
hook fires too early. The revision $post
content has been saved, but its meta fields
have not (they're saved shortly after). So the meta fields
of the revision aren't updated when we copy_post
over top of the original.
Fix: Need to hook into an action later on. Possibly publish_post.
Work Around
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.