Multi Network issueshttps://jjj.software/publicious/plugins/wp-multi-network/-/issues2017-04-18T07:10:26Zhttps://jjj.software/publicious/plugins/wp-multi-network/-/issues/30Move repository underneath Stuttter organization2017-04-18T07:10:26ZJohn James JacobyMove repository underneath Stuttter organization*Created by: johnjamesjacoby*
I'd like to move this plugin into the Stuttter organization, but want to make sure there are no objections from other contributors, @rmccue specifically who's been active recently.
https://github.com/stu...*Created by: johnjamesjacoby*
I'd like to move this plugin into the Stuttter organization, but want to make sure there are no objections from other contributors, @rmccue specifically who's been active recently.
https://github.com/stuttter/
**Imported comments:**
*By spacedmonkey on 2015-10-23 09:30:26 UTC*
All good with me :+1:
*By johnjamesjacoby on 2015-10-23 15:16:32 UTC*
Great. Thanks @spacedmonkey!
*By rmccue on 2015-10-24 14:52:10 UTC*
I have no opinion either way, so feel free to move it :)
*By johnjamesjacoby on 2015-10-24 18:10:41 UTC*
Thanks @rmccue!https://jjj.software/publicious/plugins/wp-multi-network/-/issues/29Lack of good Documentation and Example Getting Started2017-04-18T07:10:26ZJohn James JacobyLack of good Documentation and Example Getting Started*Created by: mdramos*
As a user I would like some type of clear example/demo for using this plugin. So far I am failing to get the proper functionality out of it. I try to create a new network and it just doesn't work (404s, page breaki...*Created by: mdramos*
As a user I would like some type of clear example/demo for using this plugin. So far I am failing to get the proper functionality out of it. I try to create a new network and it just doesn't work (404s, page breaking).
Users in the support page have also posted similar issues but there was never a response.
https://wordpress.org/support/topic/wp-multi-network-multisite
https://wordpress.org/support/topic/plugin-wp-multi-network-404-for-child-pages
**Imported comments:**
*By mdramos on 2015-10-14 17:59:47 UTC*
Here is a seemingly good tutorial: https://premium.wpmudev.org/blog/network-of-multisite-networks/
However troubles still arrive. I can not successfully create a separate network and add sites to it. All of my testing is done from fresh installs.
*By johnjamesjacoby on 2015-10-22 19:21:52 UTC*
Thanks for the feedback, but there's not much actionable here. The plugin itself works very well, and I agree that much of it's functionality is relatively invisible. We can look at video tutorials or something to pitch it more, but that doesn't help you with your "everything is broken" problem.
I'm going to close this issue, and ask that if you have any specific ones, you please create new issues for each of them so they can be addressed individually.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/28_network_options() functions now in WordPress 4.42017-04-18T07:10:26ZJohn James Jacoby_network_options() functions now in WordPress 4.4*Created by: johnjamesjacoby*
WP Multi Network causes fatal errors from duplicate function names, introduces in WordPress 4.4.
We should wrap them in `function_exists()` checks for now, and ensure core function parameters match ours....*Created by: johnjamesjacoby*
WP Multi Network causes fatal errors from duplicate function names, introduces in WordPress 4.4.
We should wrap them in `function_exists()` checks for now, and ensure core function parameters match ours.
**Imported comments:**
*By johnjamesjacoby on 2015-10-05 18:39:51 UTC*
See: https://core.trac.wordpress.org/changeset/34777
Parameter order is also in flux, ideally will change to match what we have here.
*By spacedmonkey on 2015-10-06 07:58:35 UTC*
For what it is worth, I would have either back ported the functions from 4.4 or at the very lease changed the order of the Params to match the core. This should be a breaking change for this plugin. This will force uses to change they code to support the new functions in core.
Just my two cents 😄https://jjj.software/publicious/plugins/wp-multi-network/-/issues/27Single Sign On, Cookie Not Enabled2017-04-18T07:10:27ZJohn James JacobySingle Sign On, Cookie Not Enabled*Created by: steven-klein*
This plugin is awesome, but I can seem to get the single sign on experience working.
I've added and updated the Cookie constants to my config file, but I'm still prompted for a username and password at each...*Created by: steven-klein*
This plugin is awesome, but I can seem to get the single sign on experience working.
I've added and updated the Cookie constants to my config file, but I'm still prompted for a username and password at each network, and WordPress is saying cookies are blocked or not supported, but they definitely are.
**Imported comments:**
*By johnjamesjacoby on 2015-10-22 21:12:30 UTC*
If the domains are different, than you'll need additional code & configuration to get all domains reading & writing cookies to their proper locations. This is currently out of scope for WPMN, but likely should come baked in at some point.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/26Single Sign-on redirect loop2017-04-18T07:10:27ZJohn James JacobySingle Sign-on redirect loop*Created by: zagriyen*
Hi, when i put the single sign-on snippet with my primary domain I've got a redirect loop when i go to a another network
```
// Cookies
define( 'COOKIEHASH', md5( 'yourdomain.com' ) );
define( 'COOKIE...*Created by: zagriyen*
Hi, when i put the single sign-on snippet with my primary domain I've got a redirect loop when i go to a another network
```
// Cookies
define( 'COOKIEHASH', md5( 'yourdomain.com' ) );
define( 'COOKIE_DOMAIN', 'yourdomain.com' );
define( 'ADMIN_COOKIE_PATH', '/' );
define( 'COOKIEPATH', '/' );
define( 'SITECOOKIEPATH', '/' );
define( 'TEST_COOKIE', 'thing_test_cookie' );
define( 'AUTH_COOKIE', 'thing_' . COOKIEHASH );
define( 'USER_COOKIE', 'thing_user_' . COOKIEHASH );
define( 'PASS_COOKIE', 'thing_pass_' . COOKIEHASH );
define( 'SECURE_AUTH_COOKIE', 'thing_sec_' . COOKIEHASH );
define( 'LOGGED_IN_COOKIE', 'thing_logged_in' . COOKIEHASH );
```
**Imported comments:**
*By johnjamesjacoby on 2015-08-17 04:29:46 UTC*
Hi. Did you replace "yourdomain.com" and "thing_" with yours?
*By zagriyen on 2015-08-17 17:26:32 UTC*
Hi, i replace them by "jm_" and it doesn't work.
but i use 2 diferents domain, network 1 domain1 and network 2 domain2
maybe it's the problem
*By johnjamesjacoby on 2015-10-22 21:11:07 UTC*
For single-sign-on to work, you'll need more than just cookie sharing. You'll need to do some fancy redirecting to drop & read the appropriate cookies. That's a bit beyond the scope of WPMN for now, but it would be ideal if it were built in.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/25Add unit tests2017-04-18T07:10:27ZJohn James JacobyAdd unit tests*Created by: rmccue*
We need unit tests. Working on it. :)*Created by: rmccue*
We need unit tests. Working on it. :)https://jjj.software/publicious/plugins/wp-multi-network/-/issues/24add_network uses current user for main site2017-04-18T07:10:27ZJohn James Jacobyadd_network uses current user for main site*Created by: rmccue*
This bit me just now.
IMO, `add_network` should take a mandatory param with the user ID, ala `wpmu_create_blog`.*Created by: rmccue*
This bit me just now.
IMO, `add_network` should take a mandatory param with the user ID, ala `wpmu_create_blog`.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/23Site can be moved to network with conflicting subdomain2017-04-18T07:10:27ZJohn James JacobySite can be moved to network with conflicting subdomain*Created by: rmccue*
If I have a site on network 2 with the subdomain `foobar.network2.example.com`, and try to move across a site from the main network with the same subdomain (`foobar.example.com`), WPMN happily does this without comp...*Created by: rmccue*
If I have a site on network 2 with the subdomain `foobar.network2.example.com`, and try to move across a site from the main network with the same subdomain (`foobar.example.com`), WPMN happily does this without complaining.
This causes two sites in the same network to both have the same subdomain, and hence same full URL. :-1:
WPMN should check for this when moving, and a) fail to move it at all, and b) offer to move and rename (after running through the uniqueness process).https://jjj.software/publicious/plugins/wp-multi-network/-/issues/22Moving site doesn't update home/siteurl2017-04-18T07:10:27ZJohn James JacobyMoving site doesn't update home/siteurl*Created by: rmccue*
Moving a site from the main network across to a different network doesn't appear to update the `siteurl` or `home`, leading it to still think it's available at `abc.example.com` instead of `abc.othernetwork.example....*Created by: rmccue*
Moving a site from the main network across to a different network doesn't appear to update the `siteurl` or `home`, leading it to still think it's available at `abc.example.com` instead of `abc.othernetwork.example.com`.
**Imported comments:**
*By johnjamesjacoby on 2015-10-22 21:07:47 UTC*
This should now be fixed in master, for 1.7.0.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/21PHP Warning on deleting network with 'ENABLE_NETWORK_ZERO' = true2017-04-18T07:10:27ZJohn James JacobyPHP Warning on deleting network with 'ENABLE_NETWORK_ZERO' = true*Created by: cfoellmann*
if
```php
define( 'ENABLE_NETWORK_ZERO', true );
define( 'RESCUE_ORPHANED_BLOGS', true );
```
then
```
PHP Error Count Location Call Stack Component
Warning Creating default object from empty value
1...*Created by: cfoellmann*
if
```php
define( 'ENABLE_NETWORK_ZERO', true );
define( 'RESCUE_ORPHANED_BLOGS', true );
```
then
```
PHP Error Count Location Call Stack Component
Warning Creating default object from empty value
1
/srv/www/wp-content/plugins/wp-multi-network/includes/functions-wp-ms-networks.php:541
move_site()
delete_network()
WPMN_Admin->delete_network_page()
WPMN_Admin->networks_page()
do_action('toplevel_page_networks')
Core
```
**Imported comments:**
*By johnjamesjacoby on 2015-10-22 21:03:51 UTC*
Fixed this differently in 1.7.0, which will require WordPress 4.4 and use some of the newer network functionality.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/20"Install" Admin. Possible?2017-04-18T07:10:27ZJohn James Jacoby"Install" Admin. Possible?*Created by: cfoellmann*
Does anyone see a way to create an admin area one level above `wp-admin/network`? And this in a "(semi-)native" way?
**Imported comments:**
*By johnjamesjacoby on 2015-07-10 01:05:16 UTC*
This would be idea...*Created by: cfoellmann*
Does anyone see a way to create an admin area one level above `wp-admin/network`? And this in a "(semi-)native" way?
**Imported comments:**
*By johnjamesjacoby on 2015-07-10 01:05:16 UTC*
This would be ideal, and in previous discussions we've referred to this as a "Global" dashboard.
See also: https://core.trac.wordpress.org/ticket/32754
*By johnjamesjacoby on 2015-10-22 21:07:24 UTC*
I have a pretty radical idea for this I'd like to implement in 1.8.0.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/19Unfiltered and broken links in admin views2017-04-18T07:10:27ZJohn James JacobyUnfiltered and broken links in admin views*Created by: spacedmonkey*
I found a number of broken links in admin list view.
### Firstly this view
![screen shot 2015-05-13 at 11 52 12](https://cloud.githubusercontent.com/assets/237508/7608996/938d74f6-f966-11e4-8c5b-344a5db...*Created by: spacedmonkey*
I found a number of broken links in admin list view.
### Firstly this view
![screen shot 2015-05-13 at 11 52 12](https://cloud.githubusercontent.com/assets/237508/7608996/938d74f6-f966-11e4-8c5b-344a5db8a79e.png)
The "Network admin" link doesn't use the network_admin_url function. If you are filtering network_site_url which I am for domain mapping reasons, you get the unfiltered url.
### Second view
![screen shot 2015-05-13 at 11 56 49](https://cloud.githubusercontent.com/assets/237508/7609070/2cb400c8-f967-11e4-96f4-86f7cb3c1402.png)
Visit, Dashboard links link to the wrong site url. It links to a different blog in the network. At a guess, I would guess this happened because the links link to the blog in the network that has the lowest blog id. This however is not the "primary" site on the network. This is because the blog was transferred into the network from another earlier network.
Both of these views should work how the [sites list table works](https://github.com/WordPress/WordPress/blob/a18118ed7c3e7441f086588fba33e21210487cfa/wp-admin/includes/class-wp-ms-sites-list-table.php#L267-L269) and use the switch_to_network() and restore_current_network() function calls while loop around network. In that context you can just call network_admin_url and network_site_url functions.
Related: #11 https://jjj.software/publicious/plugins/wp-multi-network/-/issues/18Infinite Redirect loop2017-04-18T07:10:27ZJohn James JacobyInfinite Redirect loop*Created by: LevyImage*
Hi,
I've update my copy of the WP repo version with your newest additions here on github,
when creating a 2nd network and going to it's url, it goes into an infinite redirect loop...
Any suggestions? thank you...*Created by: LevyImage*
Hi,
I've update my copy of the WP repo version with your newest additions here on github,
when creating a 2nd network and going to it's url, it goes into an infinite redirect loop...
Any suggestions? thank you
**Imported comments:**
*By johnjamesjacoby on 2015-06-21 06:22:55 UTC*
Check a few things:
* Cookies & that you are logged in
* Where are you being redirected from & too?
* Is domain mapping a factor?
* Is apache/nginx/other configured to support both/all domains?
* Is any other plugin hi-jacking anything related to home & site URLs?https://jjj.software/publicious/plugins/wp-multi-network/-/issues/17404 for child blogs in subnetwork2017-04-18T07:10:27ZJohn James Jacoby404 for child blogs in subnetwork*Created by: mathiasfriman*
Multi-site with subdirectories, not subdomains as blog. Creating networks works fine. However, when assigning blogs to sub-networks, the blogs are not found.
Setup:
domain.com/network1/blog1 - 404 oops
...*Created by: mathiasfriman*
Multi-site with subdirectories, not subdomains as blog. Creating networks works fine. However, when assigning blogs to sub-networks, the blogs are not found.
Setup:
domain.com/network1/blog1 - 404 oops
domain.com/network1/blog2 - 404 oops
domain.com/network2/blog1 - 404 oops
domain.com/network2/blog2 - 404 oops
etc.
## Half a workaround
Changing "path" in **wp_blogs**, and "site_url", "home" in **wp_*_options** by removing the **/** displays the "frontpage" of the blog
domain.com/network1blog1 - Displays frontpage, but does not work when clicking on posts/pages
domain.com/network1blog2 - same as above
domain.com/network2blog1 - same as above
domain.com/network2blog2 - same as above
Standard Multi-site .htaccess: http://paste.debian.net/plain/152338
**Imported comments:**
*By johnjamesjacoby on 2015-06-21 06:24:27 UTC*
Are you saying there is a trailing slash in the path that does not belong?https://jjj.software/publicious/plugins/wp-multi-network/-/issues/16Plugin lives in src2017-04-18T07:10:27ZJohn James JacobyPlugin lives in src*Created by: jtsternberg*
Any reason plugin cannot be top-level instead of living in /src? It makes it much more difficult to use the git version as a WordPress plugin.
**Imported comments:**
*By rmccue on 2015-05-20 07:35:00 UTC*
...*Created by: jtsternberg*
Any reason plugin cannot be top-level instead of living in /src? It makes it much more difficult to use the git version as a WordPress plugin.
**Imported comments:**
*By rmccue on 2015-05-20 07:35:00 UTC*
@johnjamesjacoby Let's move `src/wpmn-loader.php` up to `plugin.php`? :)
*By mgburns on 2015-05-31 21:31:44 UTC*
:+1:
*By inderpreet99 on 2015-06-01 14:39:10 UTC*
+1 from me as well. This is something we've had to do in [our fork](https://github.com/bu-ist/wp-multi-network) (bc5c3d149cdc0ad548e91519df8e26d7e5661bd3).
*By spacedmonkey on 2015-06-02 12:18:02 UTC*
Generally make this repo a place where people can get the code. At the moment the wordpress plugin repo is version of the plugin is massively out of date. To get all the latest bug fixes and features (like my wp cli commands) you have to load from github. But with it not in the root, it makes it hard, as you can't just check the plugin out in your plugin directory. Also it would be nice to have tagged versions of the repo that are the same as the plugin version numbers.
*By johnjamesjacoby on 2015-06-21 06:25:41 UTC*
I'm fine with getting rid of the src directory.
It was originally setup this way to be all trendy and cool and include a bunch of tests & stuff.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/15Notice: like_escape is deprecated since version 4.0! Use wpdb::esc_like() ins...2017-04-18T07:10:27ZJohn James JacobyNotice: like_escape is deprecated since version 4.0! Use wpdb::esc_like() instead.*Created by: jtsternberg*
**Imported comments:**
*By jtsternberg on 2015-01-14 20:59:05 UTC*
https://github.com/johnjamesjacoby/wp-multi-network/blob/master/src/includes/class-wp-ms-networks-list-table.php#L143*Created by: jtsternberg*
**Imported comments:**
*By jtsternberg on 2015-01-14 20:59:05 UTC*
https://github.com/johnjamesjacoby/wp-multi-network/blob/master/src/includes/class-wp-ms-networks-list-table.php#L143https://jjj.software/publicious/plugins/wp-multi-network/-/issues/14UI for the assign sites screen is cumbersome for large volumes2017-04-18T07:10:27ZJohn James JacobyUI for the assign sites screen is cumbersome for large volumes*Created by: Japh*
If there are large numbers of sites on either side of the equation when assigning sites to different networks, it's very difficult to find and identify specific sites.
Possibly adding the ability to search / filter...*Created by: Japh*
If there are large numbers of sites on either side of the equation when assigning sites to different networks, it's very difficult to find and identify specific sites.
Possibly adding the ability to search / filter the multiple select fields would help mitigate the difficult dealing with large volumes.
**Imported comments:**
*By Japh on 2015-01-12 03:38:15 UTC*
cc/ @rmccue
*By kaichi on 2015-02-13 04:18:33 UTC*
Are you trying to move subdomains to other Networks in this scenario? I wanted to provide feedback from what I see from my perspective. I have mainly networks/domains.
I agree, my only work around that is not intuitive: typing the domain out when the drop down menu is highlighted. The downside is that you have to know exactly how the domain is spelled to get through a ton of domains (say if you have domain names with similar names). Another con is if you have to many subdomains/domains with "keywords" you might struggle to find the exact same domain. Say, 20 or 30 domains have similar words.
*By johnjamesjacoby on 2015-06-21 06:26:58 UTC*
I agree, that this UI needs improvement.
It also just generally looks dated compared to recent attention to `wp-admin` in general.
I'll look at improving this soon.
*By johnjamesjacoby on 2015-10-22 21:06:04 UTC*
This was improved somewhat in what will be 1.7.0. There's more to do, though.
Closing for now. Let's reopen or create a new issue once we have some design direction?https://jjj.software/publicious/plugins/wp-multi-network/-/issues/13Assign sites screen lacks information for clear identification2017-04-18T07:10:27ZJohn James JacobyAssign sites screen lacks information for clear identification*Created by: Japh*
On a multi network installation when using the "Assign Sites" screen to move sites from one network to another, there isn't enough information displayed to uniquely identify similarly named sites.
It might be usefu...*Created by: Japh*
On a multi network installation when using the "Assign Sites" screen to move sites from one network to another, there isn't enough information displayed to uniquely identify similarly named sites.
It might be useful to show include the site ID, or sub-domain.
**Imported comments:**
*By Japh on 2015-01-12 03:38:10 UTC*
cc/ @rmccue
*By johnjamesjacoby on 2015-06-21 06:27:46 UTC*
Related to #26
*By johnjamesjacoby on 2015-10-22 21:09:35 UTC*
This is improved in master for what will be the 1.7.0 release.https://jjj.software/publicious/plugins/wp-multi-network/-/issues/12switch_to_network changes original objects when switching2017-04-18T07:10:27ZJohn James Jacobyswitch_to_network changes original objects when switching*Created by: rmccue*
`switch_to_network` (or more accurately, `restore_current_network`) messes up the network objects returned from `get_networks`, as objects are passed by reference, and these are stored in the global `$sites`*Created by: rmccue*
`switch_to_network` (or more accurately, `restore_current_network`) messes up the network objects returned from `get_networks`, as objects are passed by reference, and these are stored in the global `$sites`https://jjj.software/publicious/plugins/wp-multi-network/-/issues/11"Search Networks" is broken2017-04-18T07:10:27ZJohn James Jacoby"Search Networks" is broken*Created by: cfoellmann*
I know the search for WP_List_Table is bad but this one is broken.
Following issues:
- _ALL_ search terms, but `*` (all networks are correctly displayed), result in __No networks found.__
- the _ID_ of an exi...*Created by: cfoellmann*
I know the search for WP_List_Table is bad but this one is broken.
Following issues:
- _ALL_ search terms, but `*` (all networks are correctly displayed), result in __No networks found.__
- the _ID_ of an existing network results in __No networks found.__ BUT shows __1 item__ for the table
**Imported comments:**
*By kaichi on 2014-12-18 08:03:55 UTC*
I just noticed in class-wp-ms-networks-list-table.php on line 41 uses [like_escape](http://codex.wordpress.org/Function_Reference/like_escape) and according to Codex it has deprecated in 4.0, suggests using $wpdb->esc_like()
*By cfoellmann on 2014-12-18 08:14:31 UTC*
It's unrelated.
There is a closed PR for this here but it would increase the required WP version to 4.0 which is not really feasible.
*By rmccue on 2014-12-18 10:54:50 UTC*
> There is a closed PR for this here but it would increase the required WP version to 4.0 which is not really feasible.
Could not we not use `if (function_exists(array($wpdb, 'esc_like'))) $wpdb->esc_like(...); else like_escape(...)`? (Obviously in a wrapper function)
*By kaichi on 2014-12-29 07:37:12 UTC*
A few things from what I've been tinkering with,
What if $query **lines 45 to 57** is not playing well
-or- perhaps a SQL syntax error in the additional $query $search_conditions on **line 60 to 85**
Like @cfoellmann described, querying with **site_id** will show count for $total_query but when $query gets plugged into **line 118** $wpdb->get_results **return an empty array!**
If you query a domain, we get nothing back from $total_query and an empty array is returned on line 118.
If you look at **lines 69 - 72** this does not handle domains to well, $total_query and $query return nothing. If you comment out 69 and 70 then on line 71 and 72 replace $blog_s to $like_s you will notice that $total_query will count the matches, mydomain.com will count 1; myseconddomain.com count 1. $query still returns a blank array on **line 118**
I am reading the entire SQL query in my head; both as a numeric and string but I cannot for the life of me figure out why line 118 is returning a blank array. Is $wpdb blocking the query????
>$this->items = $wpdb->get_results( $query, ARRAY_A );
Sorry if my regurgitated text is confusing I'm new to this.