Giter Site home page Giter Site logo

facetwp-p2p's Introduction

FacetWP - P2P

Before updating

This version is not compatible with P2P facets created with previous version of this plugin. You will need to recreate and re-run the indexing process.

Description

This plugin add two new type of sources for your facets, Posts to Posts (P2P) connections and their metas.

Installation

Requirements

  • FacetWP 2.0.4 or greater

Installation

  1. Unpack the download-package.
  2. Upload the files to the /wp-content/plugins/ directory.
  3. Activate the plugin

Changelog

3.0.2 (Oct 5, 2021)

  • Fix missing P2P connexion when rebuilding index from FacetWP settings page.

3.0.1 (Apr 8, 2021)

  • Fix wrong site ID use when indexing connection
  • Fix FacetWP Indexer index method expect integer

3.0.0 (Sep 1, 2020)

  • New filter facetp2p_p2p_connexions : Change available connexions for FacetWP P2P
  • New filter facetp2p_p2p_source_name_from / facetp2p_p2p_source_name_to : Change P2P facets's name
  • New filter facetp2p_p2pmeta_source_name : Change P2P metas facets's name
  • Remove use of deprecated column 'facet_source' in sql queries
  • Bump minimum version to FacetWP to 3.3.2

2.1.2 (Feb 13, 2020)

  • Fix indexing issue for facets with P2P / P2P meta source when variations support is enable (resync needed)

2.1.1 (Jul 12, 2019)

  • Fix Fatal error when a P2P connection between a post type and a user is created

2.1.0 (Nov 10, 2017)

  • New filter facetp2p_p2p_index_params : Change the data generated for a post when indexing a P2P connexion
  • New filter facetp2p_p2pmeta_index_params : Change the data generated for post when indexing a P2P metas
  • Fix some coding standards

2.0.0 (Oct 19, 2017)

Complete rewrite of the plugin. Now directly hook into FacetWP sources list instead of adding a custom facet.

  • Add support for P2P connections in FacetWP sources
  • Add support for P2P connection metas in FacetWP sources

facetwp-p2p's People

Contributors

petitphp avatar saulirajala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

facetwp-p2p's Issues

Posts-to-users - Erreur 500

Erreur

Lors de l'ajout ou de la suppression d'un lien entre un post et un user, une erreur 500 survient et bloque l'appel AJAX.
Uncaught Error: Call to undefined method P2P_Side_User::first_post_type() in /app/web/app/plugins/facetwp-p2p/facetwp-p2p.php on line 385

Données

L'ajout du lien se fait depuis le post, aucun moyen de sélection présent côté fiche utilisateur.
J'ai ajouté une connexion p2p de type posts-to-users (custom post type) comme ceci :

p2p_register_connection_type( [
	'name' => 'service_to_users',
	'from' => 'service',
	'to'   => 'user',
] );

Enregistrement du custom post type

register_post_type(
	'service',
	[
		'label'               => __( 'Services', 'domain' ),
		'labels'              => [
			'name'               => __( 'Services', 'domain' ),
			'singular_name'      => __( 'Service', 'domain' ),
			'add_new'            => __( 'Ajouter un service', 'domain' ),
			'add_new_item'       => __( 'Ajouter un service', 'domain' ),
			'edit_item'          => __( 'Modifier le service', 'domain' ),
			'new_item'           => __( 'Nouveau service', 'domain' ),
			'view_item'          => __( 'Voir le service', 'domain' ),
			'view_items'         => __( 'Voir les services', 'domain' ),
			'search_items'       => __( 'Chercher un service', 'domain' ),
			'not_found'          => __( 'Aucun service trouvé.', 'domain' ),
			'not_found_in_trash' => __( 'Aucun service trouvé dans la poubelle.', 'domain' ),
			'menu_name'          => __( 'Services', 'domain' ),
		],
		'menu_icon'           => 'dashicons-paperclip',
		'public'              => false,
		'exclude_from_search' => true,
		'publicly_queryable'  => false,
		'show_ui'             => true,
		'show_in_nav_menus'   => true,
		'show_in_menu'        => true,
		'show_in_admin_bar'   => true,
		'capability_type'     => [ 'service', 'services' ],
		'hierarchical'        => true,
		'supports'            => [ 'title' ],
		'has_archive'         => false,
		'show_in_rest'        => false,
		'menu_position'       => 25,
		'can_export'          => true,
	]
);

Environnement

J'utilise :

  • WordPress v5.2.1
  • Post-to-posts v1.6.5
  • FacetWP v3.3.2
  • FacetWP - Posts 2 Posts v2.0.0
  • (FacetWP Map Facet v0.5.1)
  • (FacetWP Load More v0.4.3)

Unknown column 'facet_source' in 'where clause'

J'ai une erreur : "Unknown column 'facet_source' in 'where clause'" quand j'utilise la fonction p2p_delete_connections. (Je n'ai pu voir l'erreur qu'à travers une commande wp_cli).

En supprimant la ligne 304 (AND facet_source = %s ) et l'injection de donnée en dessous, la suppression se fait bien et il n'y a plus d'erreur.

Dans la base de données, la colonne "facet_source" n'existe pas (plus ?). La fonction pourrait aussi être simplifiée je pense.

Erreur de la base de données WordPress Unknown column 'facet_source' in 'where clause' pour la requête 
DELETE FROM qp2_3_facetwp_index
WHERE post_id IN (28400, 21039)
AND facet_value IN (28400, 21039)
AND facet_source = 'p2p/race_to_result/courses'
faite par [...] FWP_P2P->p2p_delete_connections

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.