WEBTEBOUL DIGITAL SOLUTIONS
Forum Replies Created
-
I used your script : pdb_wp_user_shortcode.php with your shortcode pdb_user_list. But it’s not working. The record is not working. And thank you for your plugging Loging but the goal is to use the WordPress credentials. Is it possible?
Thank you very much. I added with IA a custom code to modify my customer’s record. The code retrieves the “pid” value. But I have another question, I can’t figure out how to protect my page so that only my user can see his registrations?
Thank you, but that’s not my question.
How can my users edit their details directly without the direct link? I want them to be able to edit their details when they are on the details page. I havé created a button.thank you for your support.
The link is ok but it’s not my issue. When I’m on this page https://myhairitage.co/fiche-client/fiche-client-detaillee/?pid=Z53BQ0Q, I cannot edit my information.
My code :
if ( ! function_exists( ‘child_prevent_plugin_slug_modification’ ) ) {
function child_prevent_plugin_slug_modification( $data, $postarr ) {
// Log pour debug initial
error_log(‘Fonction exécutée – ‘ . current_time(‘Y-m-d H:i:s’), 3, WP_CONTENT_DIR . ‘/debug_slug.log’);// Vérifie les conditions de base
if ( ! isset( $data['post_type'] ) || ! isset( $postarr['ID'] ) ) {
return $data;
}
// Ne s'applique qu'aux pages
if ( 'page' !== $data['post_type'] ) {
return $data;
}
$original_post = get_post( $postarr['ID'] );
if ( ! $original_post ) {
return $data;
}
// Log pour vérifier si on arrive jusqu'ici
error_log(
sprintf(
"Vérification de modification - Page: %s, Original: %s, Nouveau: %s\n",
$original_post->post_title,
$original_post->post_name,
isset($data['post_name']) ? $data['post_name'] : 'non défini'
),
3,
WP_CONTENT_DIR . '/debug_slug.log'
);
// Vérifie si le slug a été modifié
if ( ! empty( $data['post_name'] ) && $data['post_name'] !== $original_post->post_name ) {
// Détecte la source de la modification
$backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
$source = 'Interface utilisateur';
$is_plugin = false;
// Analyse plus détaillée du backtrace
foreach ( $backtrace as $trace ) {
if ( isset( $trace['file'] ) ) {
if ( strpos( $trace['file'], 'wp-content/plugins' ) !== false ) {
$source = 'Plugin: ' . basename( dirname( $trace['file'] ) );
$is_plugin = true;
} elseif ( strpos( $trace['file'], 'wp-includes' ) !== false || strpos( $trace['file'], 'wp-admin' ) !== false ) {
$source = 'WordPress Core: ' . basename( $trace['file'] );
}
}
}
// Informations utilisateur
$user = wp_get_current_user();
$user_info = $user->ID ? $user->user_login : 'Système';
// Log toutes les tentatives de modification
$log_message = sprintf(
"[%s] Type: %s - Utilisateur: %s - Source: %s - Page: '%s' (ID: %d) - Modification: %s => %s\n",
current_time( 'Y-m-d H:i:s' ),
($is_plugin ? 'AUTOMATIQUE' : 'MANUEL'),
$user_info,
$source,
sanitize_text_field( $original_post->post_title ),
absint( $postarr['ID'] ),
sanitize_text_field( $original_post->post_name ),
sanitize_text_field( $data['post_name'] )
);
error_log( $log_message, 3, WP_CONTENT_DIR . '/slug_modifications.log' );
// Bloque uniquement les modifications automatiques par les plugins
if ( $is_plugin ) {
$data['post_name'] = $original_post->post_name;
}
}
return $data;
}
add_filter( 'wp_insert_post_data', 'child_prevent_plugin_slug_modification', 999, 2 );
}Hello,
The support team indicated that this issue couldn’t be caused by the Rank Math plugin.
To investigate this further, I’ve developed a PHP tracking solution using ChatGPT that monitors all slug modifications. I’ve implemented this through a Hello Child Theme by adding the code to the functions file. The tracking now generates log entries in this format:Copy
[2025-01-07 14:35:10] Attempted slug modification by the 'seo-plugin' for the page 'Ma Page Exemple' (ID: 123): ma-page-exemple => nouvelle-pageThe tracking is working successfully. I can share the PHP code if you’d like to review it.
Best regards,
Hello,
I have opened a support ticket with Rank Math (#935983). Is it the same support team ?
I can share my website admin access so you can investigate this issue that has occurred on all recent websites.
Best regards,
Hello Rank Math Support Team,
I appreciate your previous response, but I believe there might be a misunderstanding regarding my issue. I am experiencing a problem where new slugs are being created unexpectedly, resembling duplicates with suffixes like “-2-2-2”, but without any actual redirection being set up.
Technical Details
• WordPress Version: 6.7.1
• Rank Math Version: 1.0.234
• Additional Plugins: Elementor
Problem Description
The issue is not about duplicated URLs or redirections. Instead, new slugs are being created automatically with suffixes such as “-2-2-2”. This occurs randomly and seems to be linked to the schema settings rather than any existing URL conflicts or media attachments.
What I’ve Checked
• There are no duplicate URLs or media attachments with the same slug.
• The “Redirect Attachments” option is not causing this issue, as there are no attachment URLs with these slugs.
• My permalink structure is correctly configured.
• I suspect a schema-related setting might be influencing this behavior.
Request for Assistance
Could you please investigate whether there might be an issue with how Rank Math handles schema settings that could lead to the creation of these unexpected slugs? Any guidance on resolving this issue would be greatly appreciated.
Thank you for your help!
Best regards,Forum: Plugins
In reply to: [Widgets for Google Reviews] Widget appearances without stars on my website@macalusom as-tu installé la dernière version du plugin 11.9 ? et vidé tous les caches du site ?
Forum: Plugins
In reply to: [Widgets for Google Reviews] Widget appearances without stars on my websiteIt’s back 🙂
Forum: Plugins
In reply to: [Widgets for Google Reviews] Widget appearances without stars on my websiteI updated the plugin with the last version 11.9 but it’s the same problem.
My website : https://webteboul.com
Link : https://ibb.co/smmnhS5
For your information, I use Elementor Pro with Hello Theme and WP Rocket.
- This reply was modified 1 year, 11 months ago by WEBTEBOUL DIGITAL SOLUTIONS.
- This reply was modified 1 year, 11 months ago by WEBTEBOUL DIGITAL SOLUTIONS.
Forum: Plugins
In reply to: [Widgets for Google Reviews] Widget appearances without stars on my website@liditrudex Do you have any information ?
Forum: Plugins
In reply to: [Widgets for Google Reviews] Widget appearances without stars on my website+1
The same problem for my website.
Forum: Plugins
In reply to: [Widgets for Google Reviews] When download new reviews, it goes back to 2023Hi, the same issue for me, only 2023 reviews on my website … strange.