• Resolved Wayne

    (@waynep16)


    We are seeing an issue with the latest update.

    Warning: array_intersect(): Expected parameter 2 to be an array, null given in /home/public_html/wp-content/plugins/page-or-post-clone/page-or-post-clone.php on line 123

Viewing 10 replies - 1 through 10 (of 10 total)
  • same issue here with version 5.8.
    Wasnt the plugin tested before release? Not to cool such error on prod site if I may.

    Anyone know how to fix? I removed the plugin in the hosting file manager but the issue remained.

    • This reply was modified 2 years, 10 months ago by jgroh.

    Same problem. Had to manually disable the plugin…hopefully the author sees and provides a new update.

    anyone know how to fix this?

    Same problem. This is terrible. It makes me look really bad in front of my client. I hope the developer comes up with an update pronto!

    Log out of the site. Deleted the “Page and Post Clone” plugin folder from the “WordPress” plugin folder via ftp and upload a previous version of the “Page and Post Clone” plugin folder. Then log back into WordPress and activate the plugin. It should work. Will just wait until he fixes it before updating it. Important lesson… Always back up your site before you do updates.

    Considering how long it’s taking to get something simple like this fixed, I’m inclined to abandon this plugin.

    For Anyone having this issue, go and edit the plugin itself and starting at line 121 to 134 replace what exists with the following code

    add_action('init', function(){
      global $current_user;
      $allowed_roles = array('editor', 'administrator', 'author');
      if (array_intersect($allowed_roles, $current_user->roles)) {
    
          function content_clone_link($actions, $post)
          {
              if (current_user_can('edit_posts')) {
                  $actions['duplicate'] = '<a href="' . wp_nonce_url('admin.php?action=content_clone&post=' . $post->ID, basename(__FILE__), 'clone_nonce') . '" title="Clone!" rel="permalink">Clone</a>';
              }
              return $actions;
          }
      }
      add_filter('post_row_actions', 'content_clone_link', 10, 2); // Para artigos
      add_filter('page_row_actions', 'content_clone_link', 10, 2); //Para páginas
    });

    This takes puts this in an init hook so that there is access to the $current_user global variable

    @waynep16, @djavet, @jgroh, @indalia, @benooh, @mariopalumbo, @jem111, @mreall – See above fix

    @johannawebvolta this didn’t worked for me unfortunately ??

    Plugin Author carlosfazenda

    (@carlosfazenda)

    @galatanuadrian27 @johannawebvolta @mreall @jem111 @mariopalumbo

    Thank you for reaching back. All is working now, so please update to the last version of the plugin.

    If you find it useful, please consider to make a donation at https://www.paypal.me/carlosfazenda/10

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Bug with new release’ is closed to new replies.