olive67
Forum Replies Created
-
Forum: Plugins
In reply to: [FeedWordPress] Fatal warningSince upgrade to WordPress 5.5, i have following errors :
This is currently a blocking issue because I’m no more able to publish my posts created via feedWordPress ??
Do you plan to release a fix soon ?
Thank youWarning: Declaration of FeedWordPie_Item::get_id($hash = false) should be compatible with SimplePie_Item::get_id($hash = false, $fn = ‘md5’) in /home/passi997/public_html/www.passionporsche.fr/wp-content/plugins/feedwordpress/feedwordpie_item.class.php on line 0
Warning: Declaration of FeedWordPress_Parser::parse(&$data, $encoding) should be compatible with SimplePie_Parser::parse(&$data, $encoding, $url = ”) in /home/passi997/public_html/www.passionporsche.fr/wp-content/plugins/feedwordpress/feedwordpress_parser.class.php on line 0
Warning: Cannot modify header information – headers already sent by (output started at /home/passi997/public_html/www.passionporsche.fr/wp-content/plugins/feedwordpress/feedwordpie_item.class.php:0) in /home/passi997/public_html/www.passionporsche.fr/wp-includes/functions.php on line 6270
Warning: Cannot modify header information – headers already sent by (output started at /home/passi997/public_html/www.passionporsche.fr/wp-content/plugins/feedwordpress/feedwordpie_item.class.php:0) in /home/passi997/public_html/www.passionporsche.fr/wp-admin/includes/misc.php on line 1310
Hello,
I just checked my www error log and found tousends entry of this Warning :
PHP Warning: Division by zero in /srv/data/web/vhosts/www.passionporsche.fr/htdocs/wp-content/plugins/flagallery-skins/phantom/init.php on line 77I had a ook at the code and line 77 is
$thumb_r = $width / $height;
, so I suppose height is 0. What is this height related to ? How can i avoid all these entries ?Thank you
Forum: Fixing WordPress
In reply to: WP_query with meta_query and multiselection fieldsGreat, this way it works fine (with some changes) ??
Thank you for your Help !Forum: Fixing WordPress
In reply to: WP_query with meta_query and multiselection fieldsHello,
Thank you for your quick answer but i don’t think this works as i’m not using taxonomies but wordpress categories id’s in my custom posts.
When i have a look in the post_meta table for the field “car-category” in a “car” custom post type, i have e.g. this : a:1:{i:0;s:4:”2198″;}.
When i have a look in the post-meta table fot the field “car-library-category” in a “car library” custom post type (with multiple categories selected), i have e.g. this : a:3:{i:0;s:4:”1992″;i:1;s:4:”1994″;i:2;s:4:”2198″;…
—> in the exemple above, the ID 2198 matches –> so this library item can be displayed for this car.
Hope these details can help to solve my problem.
Thank you in advance for your support.
regards,Forum: Fixing WordPress
In reply to: WP_query with meta_query and multiselection fieldsThank you for your feed-back.
Let me try to explain better :
– I have defined 2 custom posts : “car” and “car library”
– “car” and “car library” contains both a listbox enabling to select one category for the “car” custom posts and several categories for the “car library” custom post : the category is here to make the link between both “car” and “car library” custom posts
So i have 1 post for each car description but one “car library” item can be used for several cars description – e.g. 3.8 motor description in “car library” is the same for car A and car B.I would like to use WP_query to search all the “car library” posts where “car_library-category” (array as multiple selection possible) contains “car-category”
–> Could you provide me an example how to write this ith WP_Query ?I hope it’s a bit more understandable ??
Thank you in advance for your help
regards,
Forum: Plugins
In reply to: [FeedWordPress] How to go back to previous version of feedwordpress ?Hello,
Thank you for your answer. I already dowloaded the package but can I simply overwrite the current installation with old 2013.0504 package without issues ?
regards,Forum: Fixing WordPress
In reply to: WP_Query performance issuesHello,
I checked again my code and the biggest performance issue was due to the multiple calls to the function URLIsValid.
I removed that in my code and performance is now perfect ??Forum: Fixing WordPress
In reply to: WP_Query performance issuesHello,
I can also see these errors in the DB logs :140721 20:50:08 InnoDB: ERROR: the age of the last checkpoint is 15107185,
InnoDB: which exceeds the log group capacity 15095808.
InnoDB: If you are using big BLOB or TEXT rows, you must set the
InnoDB: combined size of log files at least 10 times bigger than the
InnoDB: largest such row.Any idea if this can be linked to the queries ? Maybe some parameters of the MySQL DB to modify ?
Forum: Fixing WordPress
In reply to: WP_Query performance issuesHello,
Thanks you for your quick feed-back and answers ??
– I adapted PHP code as suggested about string concatenation
– I replaced the multiple get_the_ID calls by a variable in my “While” loop
– I replaced the multiple get_post_meta calls by one call and extracted data from generated associative array–> unfortunately, no big performance improvements ??
– When you speak about indexes, has this to be created via PhpMyAdmin for the fields on which requests are done ? Could you give me more details with exemple ?
– I checked also in the log and the generated SQL query is :
SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id) INNER JOIN wp_postmeta AS mt2 ON (wp_posts.ID = mt2.post_id) WHERE 1=1 AND wp_posts.post_type = 'code_couleur_ext' AND ((wp_posts.post_status = 'publish')) AND ( (wp_postmeta.meta_key = 'pp_color-description_courte' AND CAST(wp_postmeta.meta_value AS CHAR) LIKE '%red%') OR (mt1.meta_key = 'pp_color-description_courte_en' AND CAST(mt1.meta_value AS CHAR) LIKE '%red%') OR (mt2.meta_key = 'pp_color-description_courte_de' AND CAST(mt2.meta_value AS CHAR) LIKE '%red%') ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC;
It takes some time too to execute in PhpMyadmin but is much more quicker than via PHP.
– here my new php code with your improvements suggestions :
global $post; /* if(isset($_POST['categorie_couleur']) && !empty($_POST['categorie_couleur'])){ $Col1_Array = $_POST['categorie_couleur']; $pp_categorie_couleur_list = ''; foreach($Col1_Array as $selectValue){ $pp_categorie_couleur_list = $pp_categorie_couleur_list.$selectValue.","; } // pour supprimer la dernière virgule $pp_categorie_couleur=substr($pp_categorie_couleur_list, 0, -1); } */ theme_post_wrapper( array( 'id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_page_title') ? get_the_title() : '', 'heading' => theme_get_option('theme_single_article_title_tag'), 'before' => theme_get_metadata_icons('edit', 'header'), 'content' => do_shortcode(pp_recherche_options_couleur($_POST['recherche_couleur'],$_POST['type_recherche_couleur']) ) ) ); /* fonction permettant de checker si une URL existe */ function URLIsValid($URL) { $exists = true; $file_headers = @get_headers($URL); $InvalidHeaders = array('404', '403', '500'); foreach($InvalidHeaders as $HeaderVal) { if(strstr($file_headers[0], $HeaderVal)) { $exists = false; break; } } return $exists; } /* * Function pp_recherche_options_couleur * Génère la requête sur base des information spécifiées dans le formulaire et retourne le résultat */ function pp_recherche_options_couleur ($recherche_couleur, $type_recherche_couleur) { //echo "recherche couleur : ".$recherche_couleur."<br/>"; //echo "type recherche couleur : ".$type_recherche_couleur."<br/>"; switch ($type_recherche_couleur) { case "nom": $pp_args= array('post_type' => 'code_couleur_ext', 'post_status' => 'publish', 'posts_per_page' => -1, //'no_found_rows' => true, 'cache_results' => false, 'fields' => 'ids', 'meta_query' => array ( 'relation' =>'OR', array( 'key' => 'pp_color-description_courte', 'value' => $recherche_couleur, 'type' => 'char', 'compare' => 'LIKE' ), array( 'key' => 'pp_color-description_courte_en', 'value' => $recherche_couleur, 'type' => 'char', 'compare' => 'LIKE' ), array( 'key' => 'pp_color-description_courte_de', 'value' => $recherche_couleur, 'type' => 'char', 'compare' => 'LIKE' ) ) ); break; case "code": $pp_args= array('post_type' => 'code_couleur_ext', 'post_status' => 'publish', 'posts_per_page' => -1, //'no_found_rows' => true, 'cache_results' => false, 'fields' => 'ids', 'meta_query' => array ( array( 'key' => 'pp_color-code', 'value' => $recherche_couleur, 'type' => 'char', 'compare' => '=' ) ) ); break; case "categorie": $pp_args= array('post_type' => 'code_couleur_ext', 'post_status' => 'publish', 'posts_per_page' => -1, //'no_found_rows' => true, 'cache_results' => false, 'fields' => 'ids', 'meta_key' => 'pp_color-categorie_couleur', 'meta_value' => $recherche_couleur, 'meta_compare' => '=' ); break; } // Pour debug - affichage des valeurs des paramètres $pp_query = new WP_Query($pp_args); $pp_result = ''; $pp_home_url=home_url(); // Affichage de la requete switch ($type_recherche_couleur) { case "nom": $pp_result .= '<p class="none"><b>Recherche réalisée</b> : Nom de couleur contenant <b><i>'.$recherche_couleur.'</b></i></p>'; break; case "code": $pp_result .= '<p class="none"><b>Recherche réalisée</b> : Code couleur = '.$recherche_couleur.'</p>'; break; case "categorie": $pp_result .= '<p class="none"><b>Recherche réalisée</b> : Catégorie couleur = '.$recherche_couleur.'</p>'; break; } //affiche le nombre de résultats trouvés $pp_result .= '<p class="none"><b>Résultats trouvés</b> : '.$pp_query->found_posts.'</p>' // lien pour retour vers la page de recherche .'<p><a href="'.$pp_url_home.'/espace-technique/codes-porsche/codes-peinture/">Retour sur la page de recherche</a></p>'; if ($pp_query->have_posts()) { while ($pp_query->have_posts()) : $pp_query->the_post(); $pp_post_ID = get_the_ID(); $pp_couleur_ = get_post_meta($pp_post_ID); //var_dump($pp_couleur_); $pp_couleur_code = $pp_couleur_['pp_color-code'][0]; $pp_couleur_code_description_courte = $pp_couleur_['pp_color-description_courte'][0]; $pp_couleur_code_description_courte_en = $pp_couleur_['pp_color-description_courte_en'][0]; $pp_couleur_code_description_courte_de = $pp_couleur_['pp_color-description_courte_de'][0]; $pp_couleur_nom_fichier_couleur = $pp_couleur_['pp_color-nom_fichier_couleur'][0]; $pp_couleur_nom_fichier_voiture = $pp_couleur_['pp_color-nom_fichier_voiture'][0]; $pp_couleur_notes = $pp_couleur_['pp_color-notes'][0]; $pp_couleur_url = $pp_home_url."/wp-content/uploads/colors/".$pp_couleur_nom_fichier_couleur; $pp_couleur_car_url = $pp_home_url."/wp-content/uploads/colors/".$pp_couleur_nom_fichier_voiture; $pp_result .= '<table border="1" width="100%">' .'<tr>' .'<td rowspan="4" bgcolor="#646464" style="color:#E0DEDF;text-align:center" width="6%" >'.$pp_couleur_code.'</td>' // FR .'<td width="6%"> <img src="'.$pp_home_url.'/wp-content/uploads/drapeaux/fr.png"/></td>' .'<td width="22%">'.$pp_couleur_code_description_courte.'</td>'; if (URLIsValid($pp_couleur_url)){ $pp_result .= '<td rowspan="3" width="23%"><img src="'.$pp_couleur_url.'" border="1"/></td>'; } else { $pp_result .= '<td rowspan="3" width="23%"> </td>'; } if (URLIsValid($pp_couleur_car_url)){ $pp_result .= '<td rowspan="3" width="43%"><img src="'.$pp_couleur_car_url.'"/></td>'; } else { $pp_result .= '<td rowspan="3" width="43%"> </td>'; } $pp_result .= '</tr>' // EN .'<tr>' .'<td width="6%"> <img src="'.$pp_home_url.'/wp-content/uploads/drapeaux/gb.png"/></td>' .'<td width="22%">'.$pp_couleur_code_description_courte_en.'</td>' .'</tr>' // DE .'<tr>' .'<td width="6%"> <img src="'.$pp_home_url.'/wp-content/uploads/drapeaux/de.png"/></td>' .'<td width="22%">'.$pp_couleur_code_description_courte_de.'</td>' .'</tr>' // Modèles concernés .'<tr>' .'<td colspan="4" style="padding:8px">' .'[wpspoiler name="Modèles concernés..." open="false"]' // $pp_modeles_concernes = get_field('modeles_concernes',$pp_post_ID); // var_dump( $pp_modeles_concernes ); // $pp_result .= '<ul>'; // foreach( $pp_modeles_concernes as $pp_modele_concerne) { // $pp_cat_name = get_cat_name($pp_modele_concerne); // $pp_result .= '<li>'.$pp_cat_name.'</li>'; // } // $pp_result .= '</ul>' */ // temporaire en attendant d associer les modèles aux couleurs .'<p>'.$pp_couleur_notes.'</p>' .'[/wpspoiler]' .'</td>' .'</tr>' .'</table>' .'<br/>'; endwhile; $pp_result .= '<p><a href="'.$pp_url_home.'/espace-technique/codes-porsche/codes-peinture/">Retour sur la page de recherche</a></p>'; } else { $pp_result = "<h3>Aucun résultat n'a été trouvé avec les critères spécifiés...</h3>" .'<a href="'.$pp_url_home.'/espace-technique/codes-porsche/codes-peinture/">Retour sur la page de recherche</a>'; } return ($pp_result); }
Forum: Plugins
In reply to: [Adsense Explosion] 'Adsense Explosion' with 'AdSense Click-Fraud Monitoring'Seems to work fine ??
Thank you for your help !Forum: Plugins
In reply to: [Token Manager] Plugin is Breaking User-Roles and New PostIf no solution proposed by “Token Manager” Team soon, i’ll remove plugin and try to find something else… ??
Forum: Plugins
In reply to: [Adsense Explosion] 'Adsense Explosion' with 'AdSense Click-Fraud Monitoring'Hello,
If i understand well, the only thing to do for using ‘AdSense Click-Fraud Monitoring’ is to encapsulate the ads generated by ‘Adsense Explosion’ with <DIV class=”cfmonitor”> …</DIV>.
Could you explain where/how to add <DIV class=”cfmonitor”>…</DIV> into you PHP code ?
Thank you very much
regards,Forum: Plugins
In reply to: [WordTwit Twitter Plugin] Server TimeYep, it works fine for me now ??
Thank you for your support ??Forum: Plugins
In reply to: [WordTwit Twitter Plugin] Server TimeHello,
I’ve just installed and configured the plug-in.
I have the same problem. Did you find a solution ?`
regards,Forum: Plugins
In reply to: [Token Manager] Plugin is Breaking User-Roles and New PostHello, i have curently the same issue. Did you find à solution ?
Regards,