Once I Was A Developer
Forum Replies Created
-
Forum: Plugins
In reply to: [Multisite Language Switcher] Link to different custom post typeThanks. I’ll try that.
Well it looks like it’s a WP issue.
I installed a fresh WP and followed steps to enable multisite.
I created 2 sites: the main one called “Site-1” (wp_site id=1) and a second one called “Site-2” (wp_site id=2).
I manually created two custom taxonomies via a simple plugin:
<?php /* Plugin Name: Test Custom Taxonomy WPMU */ function registerTaxonomy() { $blogId = get_current_blog_id(); $taxonomyName = "Custom Taxonomy $blogId"; $taxonomySlug = "custom-taxonomy-$blogId"; // create a new taxonomy register_taxonomy( $taxonomySlug, 'post', array( 'label' => $taxonomyName, 'rewrite' => array( 'slug' => $taxonomySlug ), ) ); } add_action( 'init', 'registerTaxonomy' ); ?>
and then created a script to test the term insert on customer taxonomy 2 on site 2:
<?php #specify host or domain (needed for wp-includes/ms-settings.php:100) $_SERVER[ 'HTTP_HOST' ] = 'test.local'; #location of wp-load.php so we have access to database and $wpdb object $wp_load_loc = "/var/www/test/wp-load.php"; require_once($wp_load_loc); switch_to_blog(2); $o = wp_insert_term( "Test for CT 2", 'custom-taxonomy-2'); print_r($o); ?>
and still getting error.
Moreover if I do a term insert on customer taxonomy 1 – that is NOT defined in site2 – i can see that site2 db has the entry in the wp_2_term_taxonomy, and that does not make sense.
I guess I will open the bug somewhere for WP dev community, unless I’m missing something since I’m not so into WP dev & logic.
Thanks Beda,
I haven’t tried yet to register taxonomies manually. I’m going to do that and let you know what happens.
P.S. I’ve just downgraded to 2.2.6 and still same issue.
So I’m guessing you don’t support WPMU?
This is what I’ve done to make it work (dirty, but it works).
Scenario:
2 blogs, 2 languages en and es.Blog#1:
custom post type: Product(products) with custom tax Product Category (product-category)
Blog#2:
custom post type: Producto(productos) with custom tax Categoria Producto(categoria-producto)wp_insert_term fails on Categoria Producto in Blog#2 (yes I switched using switch_to_blog).
I created “Categoria Producto” in Blog#1 and that fixed the issue. Weird. At this point I start thinking it could be WP itself issue, since, at least from UI point of view, your plugin seems fine.Sure!
Thanks guys!
Forum: Plugins
In reply to: [Query Monitor - The developer tools panel for WordPress] AJax / JS issuesVersion 2.5.6 fixed my problem.
Thanks
Forum: Plugins
In reply to: [Query Monitor - The developer tools panel for WordPress] AJax / JS issuesCool!
Forum: Plugins
In reply to: [Query Monitor - The developer tools panel for WordPress] AJax / JS issuesI’ve kinda same issue. Plugin is fine unless I make some ajax call using the standard admin-ajax.php method. I get a 500. Error logs reports Premature end of script headers: admin-ajax.php (WP 3.7.0)
Forum: Plugins
In reply to: [Google Maps GPX Viewer] Upgrade failure for 3.3I have the same problem with WP 3.6
Forum: Plugins
In reply to: [Posts 2 Posts] error Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'I had same issue, but in different context.
Try to see if your code of in any other plugin code there’s a filter on ‘pre_get_posts’.
In my case the filter on pre_get_posts just set – for each query of some custom_post_type – the ‘posts_per_page’ parameter and that, for some reason I didn’t dig, broke the SQL query with that SQL_CALC_FOUND_ROWS related error.
My fix was to avoid that the needed filter had effects on p2p queries, adding some “if” in the filter’s code (… the BAD code was mine, so it’s been easy to fix ?? )
Hi Mariusz, i had the same problem/request with Revolution Slider plugin.
I wanted “editor” role to be able to edit the slider(s).
I took a look at the code and I found this in inc_php/revslider_globals.class.php on line 5
const SHOW_SLIDER_TO = "admin"; //options: admin, editor, author
That’s a constant decalaration inside the GlobalsRevSlider class.
I know – generally speaking – it’s not good to modify code, since if you update plugin you will lose this change, but if you change “admin” to “editor” in that line, your problem should be solved.
My Revolution Slider version is 2.1.4, maybe in next release it will be possible to modify that value using wp-admin UI – maybe you can do it right now too, but I didn’t find where ??
I took a look at the plugin code and it looks like it is possible using “no_posts_message” shortcode parameter, not documented here https://github.com/billerickson/Display-Posts-Shortcode/wiki
Thanks.
Forum: Plugins
In reply to: [JC Coupon] Javascript Broken in wp-admin with plugin on