rd_cool
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Image not showing in subsites (inside multisite) since WP4.1Ok, Now I am able to access the images using the following urls like :
http://bchn.businesscommunicationnetwork.com/wp-includes/ms-files.php?file=/2014/08/jacqueline-whitmore.jpg
OR
http://bchn.businesscommunicationnetwork.com/wp-content/blogs.dir/2/files/2014/08/jacqueline-whitmore.jpg
OR
http://bchn.businesscommunicationnetwork.com/files/2014/08/jacqueline-whitmore.jpgBut As I mentioned in earlier post, whenever I created a new post in http://bchn.businesscommunicationnetwork.com/ then a duplicate post automatically created in my other domain which is http://rtu.businesscommunicationnetwork.com/.
For example : I have created a post ” Test One ” in http://bchn.businesscommunicationnetwork.com/
and inserted http://bchn.businesscommunicationnetwork.com/files/2014/08/jacqueline-whitmore.jpg image in the post, then the ” Test One “ post automatically copied to the http://rtu.businesscommunicationnetwork.com and I can also see the http://bchn.businesscommunicationnetwork.com/files/2014/08/jacqueline-whitmore.jpg image within the ” Test One” post content in the http://rtu.businesscommunicationnetwork.comBut when I go to the media library in http://rtu.businesscommunicationnetwork.com then I found the http://bchn.businesscommunicationnetwork.com/files/2014/08/jacqueline-whitmore.jpg image thumbnail there in RTU library but no images shown in thumbnail, only name and URL of image is shown correctly.
Now when I select the broken thumbnail and try to insert those into the RTU post then image source always remains blank for the images which has the URL of http://bchn.businesscommunicationnetwork.com.
Need your valuable comments on this.
Forum: Networking WordPress
In reply to: Image not showing in subsites (inside multisite) since WP4.1Thank you..!!!
Forum: Networking WordPress
In reply to: Image not showing in subsites (inside multisite) since WP4.1Here is my .htaccess code
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L]I am using WordPress 4.1
The actual URL of image in my website is :
http://bchn.businesscommunicationnetwork.com/wp-includes/ms-files.php?file=jacqueline-whitmore.jpg [ not working ]
http://bchn.businesscommunicationnetwork.com/wp-content/blogs.dir/2/files/2014/08/jacqueline-whitmore.jpg [ working ]
Thanks for your comments.
Forum: Networking WordPress
In reply to: Image not showing in subsites (inside multisite) since WP4.1Thank you for assistance.
Now I have tried with the .htaccess sample given in
http://codex.ww.wp.xz.cn/htaccess#WordPress_3.4_and_belowBut still
http://blog1.com/wp-includes/ms-files.php?file=rsz_1insectone.jpg [ Not Working ]
and issue exists.Following are the details how duplicate post functionality is working on my blogs :
I am calling my ” auto_duplicate ” function using wordpress hack in blog1 function.php
add_action('auto-draft_to_publish', 'auto_duplicate '); add_action('new_to_publish', 'auto_duplicate '); add_action('draft_to_publish', 'auto_duplicate '); add_action('pending_to_publish', 'auto_duplicate '); add_action('future_to_publish', 'auto_duplicate ');I have created a custom plugin where I have ” auto_duplicate ” function.
Please find the ” auto_duplicate ” code as follow:
public function auto_duplicate($from_blog_ID, $from_post_ID, $to_blog_ID) { global $blog_id, $obj; switch_to_blog($from_blog_ID); $data = $obj->db->get_row("SELECT * FROM <code>wp_".$from_blog_ID."_posts</code> WHERE ID='".$from_post_ID."'"); $media = $obj->db->get_results("SELECT * FROM <code>wp_".$from_blog_ID."_posts</code> WHERE post_parent='".$from_post_ID."' AND post_type='attachment'"); $meta = $obj->db->get_results("SELECT * FROM <code>wp_".$from_blog_ID."_postmeta</code> WHERE post_id='".$from_post_ID."'"); $cats = $obj->db->get_results("SELECT t1.term_taxonomy_id, t2.name, t2.slug FROM <code>wp_".$from_blog_ID."_term_relationships</code> AS t1 INNER JOIN <code>wp_".$from_blog_ID."_terms</code> AS t2 ON t1.term_taxonomy_id=t2.term_id WHERE t1.object_id ='".$from_post_ID."'"); $read_more_link = get_post_meta($from_post_ID, 'custom_readmorelink', TRUE); switch_to_blog($to_blog_ID); // create new post $post = array( 'post_title' => $data->post_title, 'post_content' => $data->post_content, 'post_status' => 'publish', 'post_date' => $data->post_date, 'post_author' => 1); $post_ID = wp_insert_post( $post ); // insert categories // these are special media categories $special_media_cats = array(); $blog_id2 = 4; $blog_id1 = 2; if ($from_blog_ID == $blog_id1 && $to_blog_ID == $blog_id2) { update_post_meta($post_ID, 'custom_readmorelink', $read_more_link); } $in_special_media_category = FALSE; $final_cats = array(); foreach($cats as $cat) { $cat_ID = $obj->db->get_var("SELECT <code>term_id</code> FROM <code>{prefix}terms</code> WHERE <code>slug</code> LIKE '".$cat->slug."' LIMIT 1"); // if this is a special media category, flag that the post is assigned to one of those categories if (in_array($cat_ID, $special_media_cats)) $in_special_media_category = TRUE; If(!empty($cat_ID)) { $final_cats[] = $cat_ID; } } // if this post is not in a special media cat and is being duped to Blog2, assign it to Blog2 "Special: Articles" if (!$in_special_media_category && $to_blog_ID == $blog_id2) { $final_cats[] = 3; } $final_cats = array_unique($final_cats); wp_set_post_terms($post_ID, $final_cats, 'category'); // import media foreach($media as $item) { $post = array( 'post_title' => $item->post_title, 'post_status' => 'inherit', 'post_name' => $item->post_name, 'post_parent' => $post_ID, 'guid' => $item->guid, 'post_type' => 'attachment', 'post_mime_type' => $item->post_mime_type, 'post_author' => 1); $file_ID = wp_insert_post( $post ); } // import meta foreach($meta as $item) { $array = array( 'post_id'=>$post_ID, 'meta_key'=>$item->meta_key, 'meta_value'=>$item->meta_value); $bnet->db->insert('{prefix}postmeta', $array); } switch_to_blog($from_blog_ID); return $post_ID; }Auto duplicate functionality is working fine, and also media images were showing in previous version of wordpress that is wordpress 3.9.2 and 4.0
But as I have updated the wordpress version to 4.1 media library images issue exists.When I click on broken image thumbnail in media library, they are showing correct image path but as I insert those images in post then image source left blank.
I have tried all the .htaccess examples given at the
http://codex.ww.wp.xz.cn/htaccess#WordPress_3.4_and_belowBut still not get any success.
Looking for your valuable comments of this issue.
Forum: Networking WordPress
In reply to: Image not showing in subsites (inside multisite) since WP4.1Hello Everyone,
I am having the similar problem,
I have a multisite network with 2 subdomains.http://blog1.com
http://blog2.comThere are 2 blogs in which I have duplicate post functionality,
i.e : When I have added any post in http://blog1.com then it will be
automatically created at the http://blog2.com with all the content.It was working well with WordPress version 3.4 but As soon as I have updated the wordpress to 4.1 m getting the issue of not showing http://blog1.com images in http://blog2.com media library. Earlier it was working.
My .htaccess code is
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]http://blog1.com/wp-content/blogs.dir/2/files/2015/02/rsz_1insectone.jpg [ Working ]
http://blog1.com/files/2015/02/rsz_1insectone.jpg [ Working ]
http://blog1.com/wp-includes/ms-files.php?file=rsz_1insectone.jpg [ Not Working ]
Please help…It was over 1 week m stuck in this issue.
Hello Wiktor,
Not able to find any fix for this. Please help.Getting jQuery error TypeError: b.on is not a function
Still having the issue with preview button in WordPress 3.9.2 and 4.0
Issue is yet not resolved…..
If I disabled the CKEditor plugin then preview button is working fine.
Any fix for CKEditor…???
Even it is not working with WordPress 4.0 as well.
Hi Wiktor,
That’s ok with compatibility with WordPress 4.0, but what about preview button is not working with CKEditor 4.4.4 in wordpress 3.9.2
Please suggest how to fix this issue.
Forum: Fixing WordPress
In reply to: White ScreenI think this one should work 4 u!
Add following line of code in wp-config.phpdefine(‘CONCATENATE_SCRIPTS’, false );
OR define(‘SCRIPT_DEBUG’, true);Note: Please avoid adding in bottom of page..! 🙂