Tagged: ,

Viewing 18 reply threads
  • Author
    Posts
    • #7968
      brightestspark
      Participant

      Hi there

      Since updating to Piklist 0.9.9.12 – when admins/editors on Mac computers or iPads click ‘Save Draft’ on posts or any of our piklist custom posts, the post publishes instead of saving as draft. It only occurs for Mac users, Windows users have no problem. We deactivated all plugins except piklist to isolate. If we switch to Twenty Sixteen theme (no piklist in theme), we can save draft. Any ideas why this occurs? Let me know if you need any more info. Tested WordPress 4.7.3 and 4.7.4.

      Thanks
      Jen

    • #7969
      Steve
      Keymaster
    • #7975
      brightestspark
      Participant

      Hey Steve – installed the RC and issue is resolved! Thanks 🙂

    • #7976
      brightestspark
      Participant

      Ok update: tested the RC on our staging site and it worked but not on our live/production site.

      On our staging site, the title of the ‘Publish’ meta box is not visible.
      On our production site it has changed to ‘submitdiv’ refer http://imgur.com/a/Zl09z

      Difference between both sites

      • Staging – php 5.6.30, CGI/FastCGI – no cloudflare
      • Production – php 7.0.18, Litespeed – Litespeed cache active, cloudflare CDN/WAF – I did deploy and test with Cloudflare in Development mode to bypass cache.
    • #7986
      Jason
      Keymaster

      Hi @brightestspark!

      That is strange. Are you extending the submit metabox per chance, or doing anything like that? And are you only seeing this on an iPad?

    • #7987
      brightestspark
      Participant

      Hi all

      Just to be clear, the Publish Meta box title only changed on the Release Candidate 0.9.9.13 version on both sites. I rolled back to 0.9.9.12 and it was fine.

      But the Save Draft issue (where it publishes instead of saving to draft on Macs), occurs on 0.9.9.12 on Mac OS (tested Macbook) and iOS (tested on iPad) on BOTH our staging site and production site – a fresh clone of production was created to debug.

      When I updated to the RC 0.9.9.13, I could Save Draft on our staging site (tested on iPad), but not on our production site.

      I have checked the theme and can confirm we are not extending the submit metabox at all. The site was built by another developer and as far as I can see in the functions.php and /themes/ourtheme/piklist directory he used piklist to create a bunch of custom post types and their meta boxes in the theme and also a custom meta for posts to “feature this post”. There is also a piklist validation rule override in the functions.php – set up to enable URLs to contain special characters for UTM tracking urls (which fail the default URL validation).

      Any ideas why Macs are misbehaving since 0.9.9.12?
      I have rolled back to 0.9.9.12 on our production site.

    • #7988
      brightestspark
      Participant

      Also – the “Publish” metabox title is missing on staging or displaying as ‘submitdiv’ on production on both PC and Mac, desktop and iPad on RC 0.9.9.13

      And we updated from 0.9.9.9 to 0.9.9.12 on 7 April so something in those releases has triggered the Mac save issue.

    • #7990
      brightestspark
      Participant
      This reply has been marked as private.
      • #7992
        Jason
        Keymaster
        This reply has been marked as private.
    • #7995
      brightestspark
      Participant
      This reply has been marked as private.
      • #8031
        Jason
        Keymaster
        This reply has been marked as private.
      • #8069
        brightestspark
        Participant
        This reply has been marked as private.
    • #7996
      brightestspark
      Participant

      I just deactivated all plugins on the staging site except Piklist which has the RC 0.9.9.13 version and switched to Twenty Sixteen theme and the Publish Meta box title is still missing. I enabled debug and could see this error when I clicked Add Post:

      Notice: Undefined index: order in /var/www/familiesmagazine/staging-site/wp-content/plugins/piklist/includes/class-piklist.php on line 2311 Notice: Undefined index: order in /var/www/familiesmagazine/staging-site/wp-content/plugins/piklist/includes/class-piklist.php on line 2311

      It’s this line of the function below:

      $b['args']['order'] = is_numeric($b['args']['order']) ? $b['args']['order'] : 0;

      /**
         * sort_by_args_order
         * Sort an array by the args|order key.
         *
         * @param array $a First array.
         * @param array $b Second array.
         *
         * @return bool Status of comparison.
         *
         * @access public
         * @static
         * @since 1.0
         */
        public static function sort_by_args_order($a, $b)
        {
          if (!isset($a['args']['order']) && !isset($b['args']['order']))
          {
            return 0;
          }
      
          $a['args']['order'] = is_numeric($a['args']['order']) ? $a['args']['order'] : 0;
          $b['args']['order'] = is_numeric($b['args']['order']) ? $b['args']['order'] : 0;
      
          return $a['args']['order'] - $b['args']['order'];
        }
    • #7997
      brightestspark
      Participant

      I installed Debug bar and see the following warning and notices when I click Add Post. Tested on both our theme and Twenty Sixteen theme.

      View post on imgur.com

    • #7998
      brightestspark
      Participant

      Ok – I worked out that because I uploaded the Release Candidate version over the current version, the /wp-content/plugins/piklist/parts/meta-boxes directory was still there (though it was removed in 0.9.9.13). That’s why the submitdiv was having issues.

      I removed the /meta-boxes directory and then tested on Macbook and can see Publish title and save draft on staging site and live site. So problem solved with version 0.9.9.13.

      Cheers
      Jen

    • #7999
      brightestspark
      Participant

      Update – Macbook editors claim Safari is still publishing when they click save draft on our live site. I tested on Chrome on Macbook and that saves draft correctly. I again tested just now on Safari on Macbook and can confirm it does still publish when you click save draft. Any ideas? Is there another redundant file/directory that we need to remove. Is it PHP7?

    • #8001
      Steve
      Keymaster

      I suggest you delete the entire Piklist directory and then reinstall 0.9.9.13.

      It sounds like you have leftover files from an old version of Piklist.

    • #8005
      brightestspark
      Participant

      Yep I did that – issue still occurs on our live site with fresh install of Piklist0.9.9.13. I changed php back to 5.6 (from 7.0) and can now save draft on Mac+Safari so it’s a php 7 issue for Mac+Safari. Mac+Chrome is fine with php 7.0.

    • #8009
      Jason
      Keymaster

      Hi again!

      Ok, so to be clear you resolved the submitdiv issue?

      Now the issue is that on PHP 7 you can’t save a draft in Safari on a Mac?

    • #8016
      brightestspark
      Participant

      That’s correct Jason.

    • #8029
      Jason
      Keymaster

      Got it. I’ll try to make some time to look into this today or this weekend!

    • #8199
      Jason
      Keymaster

      Hi @brightestspark!

      So, running PHP 7 on a Mac (10.12.4) and using Safari, I create a page, gave it a title and some content, then clicked “Save Draft” and it’s saving as a draft. When I try to access the page directly it gives me a 404 (as it should because it’s a draft). Seems to be working just fine.

      This actually sounds like it could be a theme/plugin issue elsewhere. It sounds like, somehow, when querying for the posts on the live site it’s not being limited to only published posts, but drafts as well. I’m not sure why it would be a PHP 7 and Safari only issue, but that’s the best I’ve got for now.

Viewing 18 reply threads
  • You must be logged in to reply to this topic.