Only admin can upload, not editor.
-
Hi.
After update only admin can upload. is it possible to change it?
I have tried the user role editor, but cannot find rights to WPGPX maps in there.
I need Editor to upload maps.mvh. Preben
The page I need help with: [log in to see the link]
-
The same here, happened after updating to the latest version today – ironically in the changelog it says that this version solves admin problem 🙂
Yes. It is a big problem. I have 29 editors who must also have the option of inserting GPX files.
Every time there is an update I hope the best. But must roll back to previous version 1.3.16 for it to work.-
This reply was modified 7 years, 4 months ago by
ElPrebsi.
Agree, it seems like the upload for “normal” users, non-admins, is currently broken.
Is the Author working on the issue?
The plugin is marked as tested only until 4.9.9. I have last used this functionality many months ago, when it was still working. Maybe it broke during 5.0 updates of WP?
One of my WP users asked me for support yesterday, and I noticed the problem.
Thanks, Herbert
Hi guys,
I had the same issue after plugin’s update but I fixed it by modifying the files within the plugin folder to allow uploads by editors.You need to make changes in two files :
– wp-gpx-maps_admin_tracks.php
Replace ‘manage_options’ (line 6) by ‘edit_others_pages’– wp-gpx-maps-admin.php
Replace ‘manage_options’ (lines 15, 17, 35) by ‘edit_others_pages’et voilà (hoping next update will do it otherwise we will have to do it again).
Agreed, I too am experiencing this issue. In my case, I only have authors on my site, no editors, but I didn’t want them changing the global settings. Here are the changes I made to let authors upload GPS tracks.
--- wp-gpx-maps.php_orig 2019-04-29 21:42:35.000000000 -0400 +++ wp-gpx-maps.php 2019-04-29 21:43:24.000000000 -0400 @@ -41,7 +41,12 @@ // check to make sure we are on the correct plugin if ($file == $this_plugin) { // the anchor tag and href to the URL we want. For a "Settings" link, this needs to be the url of your settings page - $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/options-general.php?page=WP-GPX-Maps">Settings</a>'; + if ( current_user_can('manage_options') ) { + $menu_root = "options-general.php"; + } else if ( current_user_can('publish_posts') ) { + $menu_root = "admin.php"; + } + $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/' . $menu_root . '?page=WP-GPX-Maps">Settings</a>'; // add the link to the list array_unshift($links, $settings_link); } --- wp-gpx-maps_admin_tracks.php_orig 2019-04-29 21:28:13.000000000 -0400 +++ wp-gpx-maps_admin_tracks.php 2019-04-29 21:48:06.000000000 -0400 @@ -3,12 +3,17 @@ if ( !(is_admin()) ) return; - $is_admin = current_user_can( 'manage_options' ); + $is_admin = current_user_can( 'publish_posts' ); if ( $is_admin != 1 ) return; $gpxRegEx = '/.gpx$/i'; + if ( current_user_can('manage_options') ){ + $menu_root = "options-general.php"; + } else if ( current_user_can('publish_posts') ){ + $menu_root = "admin.php"; + } if ( isset($_POST['clearcache']) ) { @@ -29,7 +34,8 @@ ?> <div class="tablenav top"> - <form enctype="multipart/form-data" method="POST" style="float:left; margin:5px 20px 0 0" action="/wp-admin/options-general.php?page=WP-GPX-Maps"> +<?php + echo '<form enctype="multipart/form-data" method="POST" style="float:left; margin:5px 20px 0 0" action="' . get_bloginfo('wpurl') . '/wp-admin/' . $menu_root . '?page=WP-GPX-Maps">'; ?> Choose a file to upload: <input name="uploadedfile[]" type="file" onchange="submitgpx(this);" multiple /> <?php if ( isset($_FILES['uploadedfile']) ) -
This reply was modified 7 years, 4 months ago by
The topic ‘Only admin can upload, not editor.’ is closed to new replies.