Cannot edit video from WP admin on multi site installs (fix attached)
-
On a multi site (WP Network), when you create a video and click on its link to edit it you get the following error message:
You attempted to access the “XYZ Hosting Service” dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the “XYC Hosting Service” dashboard, please contact your network administrator.
If you reached this screen by accident and meant to visit one of your own sites, here are some shortcuts to help you find your way.
The problem is that the link being generated in order to edit the video doesn’t have the correct path. It is using
$_SERVER["PHP_SELF"];
to build the URL but that will not work on multi site installs where “child” sites are installed as “subdirectories”To fix this just replace
$_SERVER["PHP_SELF"];
withget_bloginfo('url')
as in other parts of the code.These are the files and lines affected:
admin/views/playlist/playlist.php line 147
admin/views/playlist/playlist.php line 150
admin/views/video/video.php line 207
admin/views/video/video.php line 210
- The topic ‘Cannot edit video from WP admin on multi site installs (fix attached)’ is closed to new replies.