Plugin Author
tinuzz
(@tinuzz)
Most likely, the reason is that the page you are doing this on doesn’t have an author. If author ID is not known, Trackserver cannot check the ownership of the page against the ownership of the track and refuses to serve it. It’s a security measure.
You would have to change the code and disable the check to make it work.
Best regards,
Martijn.
-
This reply was modified 6 years, 5 months ago by
tinuzz.
Hi,
Where can i find this?
Regards,
Kenny
Plugin Author
tinuzz
(@tinuzz)
In class-trackserver.php, look for a function named ‘validate_user_ids’.
It checks if a list of user-ids exist in the database, but if the author of the page isn’t allowed to publish other users’ tracks (i.e. s/he’s an admin), all user-ids except the author id are removed from the list before the check:
if ( ! user_can( $author_id, 'trackserver_publish' ) ) {
$user_ids = array_intersect( $user_ids, array( $author_id ) );
}
If you wrap this code in something like:
if ( $author_id != null ) {}
It will probably work. You should check the actual value of $author_id in your case, because I don’t know if it is null or something else.
Good luck,
Martijn.