Support

Account

Forum Replies Created

  • the Live Edit Plugin allows you to set up ACF fields you want to edit front end by opening a panel to the left side of the site.

    However id much prefer it if i can see where i want it to show, for example I have a tabbed content box (for example here https://www.propakura.com/file/captain-rex/) Id much rather have it so i have a tab thats only visible to admins (which i can achieve) but show the fields Live Edit creates in the panel that opens.

    Is this possible?

  • I think i am,

    
    function PreSaveForm( $post_id ) {
    
        if ( ! ( is_user_logged_in() || current_user_can('publish_posts') ) ) {
            return;
          }
    
        // check if this is to be a new post
        if( $post_id != 'new' ) {
            return $post_id;
        }
    
        // Create a new post
        $post = array(
            'post_type'     => 'file', // Your post type ( post, page, custom post type )
            'post_status'   => 'publish', // (publish, draft, private, etc.)
            'post_title'    => wp_strip_all_tags($_POST['acf']['field_55ba5b162db22']), // Post Title ACF field key
        );
    
        // insert the post
        $post_id = wp_insert_post( $post );
        // Save the fields to the post
        do_action( 'acf/save_post' , $post_id );
    
        return $post_id;
    }
    add_filter('acf/pre_save_post' , 'PreSaveForm' );
    

    How would i fix this ?

  • Thats stopped the error from showing but sadly still isnt working. Do you have an ETA on when your’ll get to look at this its holding up my site a lot and i really need this fixing :/

  • Im not uploading the pdo file type in the image field? im using the file field.

  • This reply has been marked as private.
  • This reply has been marked as private.
  • Hey John,

    I apologize for being so late in replying, I’ve been busy at work and haven’t had time to.

    The image error appears since i added a image field to test if it would allow me to upload one.

    Since i added the function i posted for you the .pdo files are uploading to my host, however the problem i have now is it isn’t being attached to my post. And if i go to the media library they say “(Unattached)” in the column

  • I just use this in my themes function

    function ApproveMime($mime_types){
    
        $mime_types['pdo'] = 'application/octet-stream';
        return $mime_types;
    
    }
    
    add_filter('upload_mimes', 'ApproveMime', 1, 1);
  • Cant attach due to security reasons, ill upload it to a file host

    http://thomasrenshaw.com/public/Arkham%20Knight%20Helmet.pdo

  • It doesnt even allow for the image field anymore

    [01-Aug-2015 01:43:01 UTC] PHP Warning: filesize(): stat failed for /tmp/php9JTRVT in /home/[removed for security reasons]/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3130

    [01-Aug-2015 01:43:01 UTC] PHP Warning: getimagesize(/tmp/php9JTRVT): failed to open stream: No such file or directory in /home/[removed for security reasons]/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3134

    [01-Aug-2015 01:43:01 UTC] PHP Warning: filesize(): stat failed for /tmp/phpCbyNkr in /home/[removed for security reasons]/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3130

    Yes, its been working fine for a good few months and suddenly stopped working a few days ago, but i cant remember if it was before or after the update. i might try downgrading my wordpress and see if that solves the problem.

    Thank you for trying to help, i appreciate it.

  • I’ve tried disabling all plugins (Over then the plugins needed) and it still isnt working.

    The tmp folder has 755 permission so im able to write to it.

    I’ve just tried it on a different theme like you suggested and it still doing the same. It might be a bug with the actual API code. Its just baffling as to why its suddenly stopped working.

  • Sorry i should’ve pointed out i’ve added it to the allowed file types in my theme functions.

    I’ve narrowed it down (somewhat…) since adding the file type to the allowed list, i’ve noticed that if the file has spaces in it, so “file name” it doesn’t get uploaded. Therefore it has to be “file-name” or “file_name” and it uploads it.

    HOWEVER it’s still not being attached to the post, BUT when i var_dump the array i get this:

    [“filename”]=>
    string(22) “does-it-need-no-spaces”

    But the url is blank
    [“url”]=>
    bool(false)

    EDIT: Actually, the filename is also being set the same as the post title.

    My Upload Page code http://pastebin.com/TBiSU4WR
    My Form Export http://pastebin.com/ZdKMwDtK

  • Hello,

    I apologize for the late reply. I have the latest version of ACF Pro. I have the latest version of WordPress.

    The Image field works, because im using it to set the feature image. The problem i have is when i try to upload a .pdo type file using the file upload field.

    Ive enabled the debugging like you say but i dont seem to see any errors when i try to upload a .pdo type file.

    Ive been in contact with my service provider and they say nothing has changed their end and as i say, its worked before

  • It doesnt work, all i want to do is make it so if the layout isnt active/selected to display a placement/empty module instead.

    Lets say ive added the layout “Head and Neck” to the form, the remaining 15 layouts are inactive. Only Head and Neck would display and it wouldnt matter about

    <!-- Image Start -->
    	<?php $image = get_sub_field('preview_prop_shoulders');
    	if( !empty($image) ): ?>
    		<img class="media-object" width="100px" src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
    	<?php else: ?>
    		<img class="media-object" width="100px" src="<?php bloginfo('template_directory'); ?>/images/pdo.png">
    	<?php endif; ?>
    <!-- Image End -->

    because it still wouldnt display (for example) the shoulder placement.

    Is there a way to check if its been populated and if it hasnt, display a placement, thats all im trying to achieve…

  • The support for this plugin is next to none, i regret buying it! what a joke.

Viewing 15 posts - 1 through 15 (of 15 total)