This thread is resolved. Here is a description of the problem and solution.
Problem:
Custom permalinks display a 404 error for oembed links.
Solution:
If you're experiencing this issue, we recommend you try the following steps:
1. Open the wp-content\plugins\custom-permalinks\includes\class-custom-permalinks-frontend.php file.
2. Replace the following snippet (Custom_Permalinks_Frontend::oembed_request() method) at line 497:
public function oembed_request( $post_id, $oembed_url ) { global $wpdb; /* * First, search for a matching custom permalink, and if found * generate the corresponding original URL. */ $original_url = null; $oembed_url = str_replace( home_url(), \'\', $oembed_url );
with
public function oembed_request( $post_id, $oembed_url ) { global $wpdb; /* * First, search for a matching custom permalink, and if found * generate the corresponding original URL. */ $original_url = null; $oembed_url = str_replace( get_option('home'), \'\', $oembed_url );
This solution might be irrelevant due to being outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 1 replies, has 2 voices.
Last updated by 2 years, 11 months ago.
Assisted by: Shekhar Bhandari.