WPSOLR: error on term
- ovaislak@hotmail.comParticipant4 years, 11 months ago #11978
Where should I add this code ?
ovaislak@hotmail.comParticipant4 years, 11 months ago #11980I think I placed the code wrongly
Error on line 313 of file /home/262510.cloudwaysapps.com/rusnfygwrz/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/classes/models/post/class-wpsolr-model-post.php: First parameter must either be an object or the name of an existing class
foreach ( $term_parents_ids as $term_parent_id ) {
$term_parent = get_term( $term_parent_id, $parent );if ( $term_parent instanceof \WP_Error ) {
throw new \Exception( sprintf( ‘WPSOLR: error on term %s for taxonomy \’%s\’: %s’, $term_parent_id, $parent, $term_parent->get_error_message() ) );
}if ( property_exists( $term_parent, ‘name’ ) ) {
array_push( $term_parents_names, $term_parent->name );
// Add the term to the non-flat hierarchy (for filter queries on all the hierarchy levels)
array_push( $taxonomy_non_flat_hierarchies, $term_parent->name );} else {
// Some taxonomies do not have the property name. Probably due to bad imports.throw new \Exception( sprintf( “WPSOLR: term %s for taxonomy %s has no name: %s”, $term_parent_id, $parent, print_r( $term_parent, true ) ) );
}
}// Add the term to the flat hierarchy
array_push( $taxonomy_flat_hierarchies, implode( WpSolrSchema::FACET_HIERARCHY_SEPARATOR, $term_parents_names ) );// Add the term to the taxonomy
array_push( $nm1_array, $term->name );ovaislak@hotmail.comParticipant4 years, 11 months ago #11982please view and amend the code, It’s difficult for me to play with this code
ovaislak@hotmail.comParticipant4 years, 11 months ago #11984Generating this error after indexing 50,001 products. I know i am taking too much of your time, but i want to make this plugin work for me
Error on line 313 of file /home/262510.cloudwaysapps.com/rusnfygwrz/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/classes/models/post/class-wpsolr-model-post.php: First parameter must either be an object or the name of an existing class
ovaislak@hotmail.comParticipant4 years, 11 months ago #11986if ( property_exists( $term_parent, ‘name’ ) ) {
ovaislak@hotmail.comParticipant4 years, 11 months ago #11988Nothing fruitful. The same “error on term” message is displayed.
ovaislak@hotmail.comParticipant4 years, 11 months ago #11991PSB
WPSOLR: term 10733 for taxonomy strength has no name:
ovaislak@hotmail.comParticipant4 years, 11 months ago #11993Indexing completed, thanks for the fix.
Does this fix excludes products with the problem or it indexes them as well ?
If it excluded those products, is there a way to get the list of excluded products / products not in index?
You must be logged in to reply to this topic.