GithubHelp home page GithubHelp logo

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.