Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Same issue. WP 3.4.1
    Frank.

    Thread Starter guteLaune17

    (@gutelaune17)

    … have checked permissions:

    /wp-content/mu-plugins : 755
    /wp-content/mu-plugins/PluginOrganizerMU.class.php : 644

    I think this is fine, too.

    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    What on earth, wp_head() was deactivated! Due to debugging reasons earlier … I did forget to re-activate it.

    Sorry, for any inconvinience … and thank you for your help!

    I love FEE!
    ??

    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    Wow, you have a memory really fascinating …! Smile.

    No, my custom modifications are not part of the play, as I have reinstalled the plugin without it.

    The only way to find out the reason of my headaches seems to be tracking the empty-field-wrapping … however its difficult for me.

    Keep you on track with the results here.

    Thread Starter guteLaune17

    (@gutelaune17)

    >> Then it means that the two setups aren’t identical.

    Hm. This seems to be the case. However, I need to find out the reason why!

    It would be a great help for me to give me a small code snippet for debugging, or at least a hint, whre to begin my search … empty ($wrapped) means, FEE cannot initialize the fee-fields correctly, however I do not have any imagination, why this can fail with respect to a different environment/setup.

    The subdirectory path (see above) may have be the reason, but in what kind … and wehre I have to do something …?

    Its 6 hours now I am spending with that … would be a great help, really!!! Thanx.

    Thread Starter guteLaune17

    (@gutelaune17)

    A post at hoster 1 (good one) lookes like:

    <div class="art-PostContent">
    <div data-type="rich" data-post_id="2668" class="fee-field fee-filter-the_content">
    <div> ... some post-content ... </div>
    </div>
    </div>

    The same (!) post at hoster 2 (bad one) lookes like:

    <div class="art-PostContent">
    <div> ... some post-content ... </div>
    </div>

    Means, at 2 nothing has been changed …

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

    Thread Starter guteLaune17

    (@gutelaune17)

    No!

    Thread Starter guteLaune17

    (@gutelaune17)

    Yes, I understand that empty( $wrapped ) prevents loading javascript … My question is:
    What can be the reason for empty ( $wrapped ) …?

    No editable elements on page .. does not seems to be the reason, as FEE works fine at the same page hosted on a different service provider.

    First I thought, I did make a stupid ‘not-activate-something’-error, but now (I’m sure …) I can exclude this.

    Another possibility is, that some path is not correct. The only difference between the 2 hosters is the subdirectory in the root-path:

    WP-content path:
    Hoster 1 (fine) : var/www/user123/htdocs/wp-content/
    Hoster 2 (fails): var/www/user123/htdocs/somesubdir/wp-content/

    Thanx a lot for help!
    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    Hi Steve, really great work, the wordbooker plugin. Thank you for all your effort!!!
    However, why couldn’t you disable/grey out those options, which are not working actually? Or Put a message on the top of the settings page. This would safe a lot of time to your potential clients/customers.

    Regards
    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    Found a solution only, modifiing plugins ‘post.php’:

    function save( $data, $content ) {
    		extract( $data );
     ...
    
     // restrict to a spefic user group (role)
     if(current_user_can('is-abc-user'))
     $my_post_title = get_post_field( 'post_title', $post_id );
    
      // 'duplicate post' (duplicate_post_create_duplicate_from_post is a generic function
    // '$some_specific_chars' is a string specific for the post
      if(!(false===strpos(strtolower($my_post_title), $some_specific_chars)))
    
      // update author_id
      $new_post_id = duplicate_post_create_duplicate_from_post($post_id);
     $postdata = array(
    
      'ID' => $post_id,
      'post_author' => $current_user->ID,
      'post_title' => $my_post_title,
      'post_name' => sanitize_title_with_dashes( $my_post_title ),
      $this->field => $content
    );
     ...
    
     wp_update_post( (object) $postdata );
    }

    If somebody has an idea how to realize this outside the plugin, it would be very appreciated.

    Thanks
    Frank.

    Thread Starter guteLaune17

    (@gutelaune17)

    Stupid solution! I thought permission would be granted once for the current page only. This was a first-class mistake. Permissions are granted for the future at all!

    As this does not work, I found a solution modifiing function check() in scribu’s post.php:

    function check( $post_id = 0 ) {
    		if ( is_array( $post_id ) )
    			extract( $post_id );
    
    		// added 5 rows: allows editing of placeholder-posts (who ever posted it, but containing 'some specific chars' in the post_title)
    		// restrict to user group 'abc-user' (example)
    		if(current_user_can('is-abc-user'))
    		$my_post_title = get_post_field( 'post_title', $post_id );
    		if(!(false===strpos(strtolower($my_post_title), $some_specific_chars)))
    		return true;
    		else
    		// --
    
    		return current_user_can( 'edit_post', $post_id);
    }

    If someone has a suggestion how to realize this outside the plugin, I would appreciate it very much!

    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    4./(5.) works fine with:

    function fee_update_post_meta($ID) {
    
      update_post_meta($ID, $meta_key, $meta_value);
    }
    add_action('pre_post_update', 'fee_update_post_meta');

    But I could not find any trick to update post-properties:

    1. post_author (author-id)
    2. post_type
    3. post_title

    How to change those update-properties before (post-saving)? What kind of hook would you recommend?

    I had spent a lot of my time today for searching a solution, but my knowledge is really on low level ..

    Thanks
    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    I’ve got it working assigning caps on specific pages, like:

    if($some_page_specific_permission) {
    
      global $wp_roles;
    
      $wp_roles->add_cap( 'ABC-user', 'edit_others_posts' );
      $wp_roles->add_cap( 'ABC-user', 'edit_others_php' );
    
    }

    FEE allows now ABC-user to edit other authors post.

    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    Hi,

    ‘front_end_editor_allow_post’ is not fired, if user has no capabilities:

    -> (1) ‘edit_other_php’ and
    -> (2) ‘edit_other_posts’

    So, whatever I put into the function below, it does not work:

    function fee_extend_user_post_cap( $allow, $data ) {
    
    			return current_user_can( 'edit_dummy_posts');
    }
    add_filter( 'front_end_editor_allow_post', 'fee_extend_user_post_cap', 2, 10);

    If I grant my user group (e.g. role ‘ABC-users’) in Capability Manager with capabilities:

    -> (1) ‘edit_other_php’ and
    -> (2) ‘edit_other_posts’

    FEE works fine for the posts from the placeholder/dummy-author. But, now ABC-user can edit posts from all other authors too, and not only in FEE but the same in dashboard. Strange! This cannot be the solution …

    What I need is a specific capability like ‘edit_dummy_posts_of_author_X’, which is RESTRICTED to author X only!
    This should be work for FEE (however it will not be a problem if this works in dashboard too).

    May be it is not a specific FEE-problem, but it would be great if you could give me some advice, how to realize that!

    Frank

    Thread Starter guteLaune17

    (@gutelaune17)

    … may be a solution could be to create a user-capabilty

    edit_published_posts_of_user_id_X

    but how to do this?
    ??

    Thank you
    Frank

Viewing 15 replies - 1 through 15 (of 16 total)