Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




When editing a post, the media icons, custom fields and permalink disappear (visible when publishing

UserPost

8:01 am
June 11, 2011


AndrewM

Member

posts 17

1

Hi Kevin,

I've got strange problem on my hands and sounds no doubt like a permissions/capability issue. If I'm logged in as a user and I edit a post within a custom post type, I'm missing the following things:

1. Media icons above the edit box (insert image/video etc)

2. Permalink underneath title

3. Wp custom fields

If I publish a new post within the cpt, all three are visible. It's only when editing the post, and if I disable RS they work fine. I'm baffled by this. Any ideas of the top of your head?

7:23 am
June 14, 2011


Kevin

Admin

posts 2503

2

I'll look into this when I get back from vacation next week. What RS and WP versions are you running?

What is the logged user's WP role? Does that role have capabilities customized? How is the CPT registered, and have you defined type-specific capabilities for it?

12:48 pm
June 22, 2011


Kevin

Admin

posts 2503

3

The missing media icons may be due to a category/taxonomy Restriction on terms which you assign to the custom post. If so, check Roles > Options > RS Role Defs for the corresponding Author or Editor role which you are assigning per-term. It will need the upload_files capability.

For permalink edit and custom fields metabox, check Roles > Options > Advanced > Limited Editing Elements. Since I don't know all the details of your configuration, you will have to fill in those details. The solution will likely involve one or more of the following:

  • remove those elements from the HTML IDs textbox
  • change pertinent WP or RS role defs to include missing capabilities
  • change the sitewide role requirements
  • change your users' sitewide role

4:38 am
June 29, 2011


AndrewM

Member

posts 17

4

Thanks so much for that Kevin. Based on your instructions I managed to get everything showing :)

I have one last thing not showing and that's the Gallery Tab on the media uploader. If I disable role scoper, and upload 3x images to the post, the gallery tab appears straight away. If I have role scoper active, the gallery tab does not appear. Any idea what setting/s control that gallery functionality? They have upload_files active.

6:41 am
June 29, 2011


AndrewM

Member

posts 17

5

Sorry Kev, I managed to figure out the gallery issue so please close this thread. Thanks for all your help.

I unticked "posts" from realm > post type usage and the gallery tab now appears on my custom post type. I ticked the post box for another reason but can't remember why, something wasn't working until I did it :) 

6:54 am
June 29, 2011


Kevin

Admin

posts 2503

6

Glad to hear it's all working for you.

The development code update I uploaded last night should make your Gallery tab appear without any need to modify Realm settings.

6:59 am
June 29, 2011


AndrewM

Member

posts 17

7

Awesome, good to know. I'll give it a whirl, thanks!

9:06 am
June 29, 2011


AndrewM

Member

posts 17

8

Hi Kevin, I gave the dev version a go and I seem to have introduced a couple of problems.

If my post (from the custom post type) is pending, and I go to the gallery and click "edit image", the image tools load fine. However, if the post is published and I click "edit image", all I get is a "-1″ printed out where the image tools should have been. 

Also, I don't seem to be able to publish posts from within my custom post type anymore. All I get is "submit for review".

My custom post type is "listing" and if I view the user in questions profile, I can see the following containing roles:

(contains Link Reader, Post Reader, Listing Reader, Private Listing Reader, Listing Contributor, Listing Author)

I'm assuming I need "Listing Editor" in there, is that correct? if so, how can I go about that?

9:25 am
June 29, 2011


Kevin

Admin

posts 2503

9

I'm not seeing this for an Editor who has a General Role assignment (Roles > General) of "Listing Editor". This is with "Listing" enabled for RS filtering in Roles > Options > Realm.

How does your configuration differ? Did you manually add capabilities to the WP Editor role def?

What WP version are you running?

7:49 pm
June 29, 2011


AndrewM

Member

posts 17

10

Got it working! I was missing "edit_published_listings" from the capabilities array when registering my "listing" custom post type. I also managed to get the posts to be published.

I've noticed some links that take me to the dashboard when I click on them. For example under network admin > role options > real, both links on this page redirect to dashboard and change the url into /wp-admin/?c=1. There's also one the "attachments utility" link on the features tab that redirects to dashboard.

9:42 pm
June 29, 2011


AndrewM

Member

posts 17

11

I've noticed that my "Nationality" taxonomy list on the edit/publish screen is behaving strangely. It seems to be always defaulting to one term, called "English". English was the first term I entered when setting them up.

If I change the term to something else, it seems to update, but then changes back to "English". Again, without role scoper it works fine… I'm just not getting it :)

My taxonomy is set up with capabilities as per below:

            'capabilities' => array (
                'manage_terms' => 'manage_categories', //by default, only administrator
                'edit_terms' => 'manage_categories',
                'delete_terms' => 'manage_categories',
                'assign_terms' => 'edit_listing'
            ),

"edit_listing" has been assigned to my custom role. If I remove this then the terms are faded out and I can't select them. i don't have any restrictions set up on ther taxonomy under restrictions > nationality or roles >nationality


6:18 am
June 30, 2011


Kevin

Admin

posts 2503

12

I'm having trouble recreating that error. Are you running WP 3.1.4?

6:33 am
June 30, 2011


Kevin

Admin

posts 2503

13

AndrewM said:

I've noticed some links that take me to the dashboard when I click on them. For example under network admin > role options > real, both links on this page redirect to dashboard and change the url into /wp-admin/?c=1.


Did you mean Role Options > Realm ? I can't tell what links you're referring to there.

8:27 am
June 30, 2011


Kevin

Admin

posts 2503

14

The bad Attachments Utility link in Multisite Role Options is fixed in the updated Role Scoper development code.

12:47 am
July 5, 2011


AndrewM

Member

posts 17

15

Hi Kevin, sorry for the delay. I was running 3.1.4, now running 3.2. Still have the problem with the taxonomy terms choosing a default when I unselect everything and then hit save. Will go over my configuration again and see if I'm missing something.

Regarding the broken links, I took a screenshot of them, see below. They are under the network options. On 3.2 they actually say I don't have permission to access them rather than linking me to the dashboard.

http://cl.ly/3b0Y013Z1h130s1B1H09

Attachments utility link works now thanks :) have never seen that page before. And thanks for the offer on looking into my admin. Unfortunately I'm working locally. I'll try in the next few days to upload everything to a live site and see if I'm still having issues with the taxonomies.

Thanks

8:21 am
July 5, 2011


Kevin

Admin

posts 2503

16

I didn't realize you were talking about the behavior when no terms are selected. This is fixed in the updated Role Scoper development code, with the following caveats:

  • Default term will always be auto-selected if the custom taxonomy has RS filtering enabled (Roles > Options > Realm > Use Taxonomies). This is due to a limitation with the RS restriction model.
  • When forcing term selection, the "default_taxname_option" value will be used, if stored to the wp_options table and editable by the logged user. Otherwise, the first-stored term which is editable by the logged user will be used.
  • Default term will not be auto-selected if the custom taxonomy has RS filtering disabled, and no "default_taxname_option" value is stored to the database.
  • Sites which rely on the previous behavior can restore it by defining the 'SCOPER_AUTO_DEFAULT_TERM' constant via wp-config.php

5:41 pm
July 5, 2011


AndrewM

Member

posts 17

17

Awesome, thanks for the clarification Kevin. Based on what you said above it looks like there's no way around the terms auto selecting one if nothing is selected, as I believe I'm using the rs filtering. Do you think this would be possibly fixed in the future or will it always be a limitation?

9:31 am
July 6, 2011


Kevin

Admin

posts 2503

18

I'm looking to improve the restriction model; will let you know when that's available.

For now, you can:

1. create a default term such as "none" or "N/A"

2. execute the following code to set it as the default option:

$taxonomy = 'my_taxonomy_name';
$default_term_id = 5; // adjust this to actual ID
update_option( "default_$taxonomy", $default_term_id );

12:58 am
July 15, 2011


AndrewM

Member

posts 17

19

Thanks Kevin,

I've made a default checkbox with your provided code, and I'll just hide it with css in the admin and on the front-end. That will do for now :)



About the Agapetry forum

Currently Online:

14 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1249

Posts: 5659

Members:

There are 1261 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin