Charlie Merland
Forum Replies Created
-
Forum: Reviews
In reply to: [WPMovieLibrary] Good PluginThanks @3ab9are! TVShow are one of the primary objectives for 2018 š
Forum: Plugins
In reply to: [WPMovieLibrary] cant import after the updateHi @samnnn,
Sorry to hear that. Can you set
WP_DEBUGtotruein your site’swp-config.phpfile and see if there’s any error appearing in your browser JavaScript console when you try importing a movie?Forum: Plugins
In reply to: [WPMovieLibrary] ErrorHi @misstomboy,
Is this happening on a specific page, or just any random page?
Forum: Plugins
In reply to: [WPMovieLibrary] Categories of articles disappearHi @lecas81,
Never heard of this before. What theme are you using? Any active plugin that might interact?
Forum: Plugins
In reply to: [WPMovieLibrary] Files modified in the update.Neither, badly updated PHP fix. I just pushed a better one that should get this sorted š®
Forum: Plugins
In reply to: [WPMovieLibrary] Files modified in the update.Hi @jeferssons,
Changed files are:
assets/css/admin/wpmoly-importer.css assets/css/admin/wpmoly-media.css assets/js/admin/wpmoly-importer-movies.js assets/js/admin/wpmoly-media.js includes/classes/class-wpmoly-utils.php includes/l10n/wpmoly-languages.php languages/wpmovielibrary-iso-de_DE.po languages/wpmovielibrary-iso-en_EN.po languages/wpmovielibrary-iso-fr_FR.po readme.txt wpmovielibrary.phpThe entire
includes/framework/reduxdirectory also got updated, but I’m not sure that’s relevant to your issue. You can also take a look at the complete changeset for version 2.1.4.6.Forum: Plugins
In reply to: [WPMovieLibrary] Movie Runtime for Short filmsHi @amjad-miandad,
That’s a very interesting point, never thought about short movies length. I’m not sure how it can be done, but I’ll definitely give it some thinking. Thanks for the feedback!
Forum: Plugins
In reply to: [WPMovieLibrary] Error in Arvhives settings : Grid Movies metaHi @doobeedoo,
Does the last update fix this?
Forum: Plugins
In reply to: [WPMovieLibrary] ‘result’ undefinedCorrect, should be fixed by the last update.
Forum: Plugins
In reply to: [WPMovieLibrary] Bug on import existing movieHi everyone,
Should be fixed by the last update. Let me know if it doesn’t š
Forum: Reviews
In reply to: [WPMovieLibrary] Fantastic Plugin but not fully compatible with most themesHi @gestroud,
Thanks for your feedback!
I’m fully aware of what you’re describing, and sadly there’s only so little that can really be done… Plugins in WordPress can offer huge features, but have very little control as to how things are display on the front site. The current version of the plugin, for example, can try to add movies to the main query so that the latest movies will appear on the homepage along with the latest posts; but if you’re using a theme that sets its own homepage template and inner rules, basically ignoring the main query, you won’t see any movie on your home. And there is nothing the plugin can do about that. I really wish themes developers would consider basic support for all registered post types and taxonomies, allowing at least some flexibility.
Forum: Developing with WordPress
In reply to: WP_REST_API Nonce not working.If your app is also using the default cookie auth method, but using a custom nonce action, your auth callback must also verify the cookie and that the user is logged in just like rest_cookie_check_errors() does. Failure to do so introduces a security vulnerability. (Iām looking at you, Charlie)
Absolutely. That was implied by my “perform your own checks”, but I reckon it could have been more explicit.
Forum: Plugins
In reply to: [WPMovieLibrary] error searching for movie dataHi @stuthemonkey,
Should be fixed by the last update version 2.1.4.4!
Forum: Developing with WordPress
In reply to: WP_REST_API Nonce not working.Hi @ivrrimum,
Bumped into the same issue today, turns out it’s not an issue at all but a misunderstanding of how that part actually works.
Basically what’s not working is that you’re replacing the default REST API nonce with your own, making the check fail because WordPress has no knowledge of you new nonce action and therefore can’t verify it properly; If you change your ‘import_posts’ action to ‘wp_rest’, the default nonce action, it works as expected. If you want to use your custom action you have to hook to the
rest_authentication_errorsfilter and perform your own checks:add_filter( 'rest_authentication_errors', function( $result ) { // $result should be null. Any other value indicates something // happened before we got here. if ( ! is_null( $result ) || is_wp_error( $result ) ) { return $result; } // Make sure we need to authenticate at all. if ( empty( $_REQUEST['wtfaid'] ) || empty( $_REQUEST['_nonce'] ) ) { return $result; } // Verifiy the nonce. $nonce = $_REQUEST['_nonce']; if ( wp_verify_nonce( $nonce, 'import_posts' ) ) { return true; } // If we're still here, just return the original result. return $result; });Note that I added a
wtfaidparameter to the Ajax request data to trigger the nonce verification only when I want it and not on every single API request :var url = "https://wp-latest.d3v.talyes.pro/?rest_route=/posts_bank/v1/import_posts/1"; $.ajax({ url: url, method: "POST", beforeSend: function ( xhr ) { xhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce ); }, data: { _nonce : wpApiSettings.nonce, wtfaid : 'hello' }, success: (response) => { alert(1); } });Also note that this method could have some collateral damage because of the replacing of the default action nonce if some other plugins/themes/features rely on it. I don’t know in what context you’re using this, but have you considered using the Backbone client for the REST API? If you’re dealing with custom post types and stuff it’s a really useful way to make use of the REST API, including permission checks, post/meta/terms creation/update/delete in a few lines of JS.
Anyway, hope that helped you somehow!
- This reply was modified 9 years, 1 month ago by Charlie Merland.
- This reply was modified 9 years, 1 month ago by Charlie Merland.
Forum: Plugins
In reply to: [WPMovieLibrary] Shortcodes [movie_grid] russian lettersHi @kolli1976,
I’m afraid there is no immediate solution to that. I’m not familiar with Russian and didn’t even think of having Russian letters there, so I’m not sure how it can be done properly; that’s something I’ll probably consider for a future release!