Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In condition self hosted plugin not installed #259

Open
masumskaib396 opened this issue Apr 17, 2022 · 10 comments
Open

In condition self hosted plugin not installed #259

masumskaib396 opened this issue Apr 17, 2022 · 10 comments

Comments

@masumskaib396
Copy link

Hi,
I’m trying to set up a self-hosted or local plugin based on a different demo. but it’s not installing the plugin.
It’s showing an alert when I’m going to install this.
” Looks like some of the plugins failed to install. Please try again. If this issue persists, please manually install the failing plugins and come back to this step to import the theme demo data. ”
thanks

@capuderg
Copy link
Contributor

Hi @masumskaib396,

does the slug in the OCDI filter code match up with the slug of the custom plugin?

Please share the recommended plugins filter code: https://ocdi.com/quick-integration-guide/#h-recommended-plugins and also let us know what the path of the custom plugin is, once you extract it.

Take care!

@masumskaib396
Copy link
Author

hi, thanks for your reply.
this our code

function slicko_register_plugins( $plugins ) {

// Check if user is on the theme recommeneded plugins step and a demo was selected.
if (
  isset( $_GET['step'] ) &&
  $_GET['step'] === 'import' &&
  isset( $_GET['import'] )
) {

  // Adding one additional plugin for the first demo import ('import' number = 0).
  if ( $_GET['import'] === '0' ) {   

    $plugins[] = [
      'name'     => 'Plumber-Helper',
      'slug'     => 'plumber-helper',
      'source'   => get_template_directory_uri() . '/inc/plugins/plumber-helper.zip',
      'required' => true,
    ];

  }
}

return $plugins ;

}
add_filter( 'ocdi/register_plugins', 'slicko_register_plugins' );

@capuderg
Copy link
Contributor

What does the plumber-helper.zip file extract into? what is the folder name when extracted?

@wp-ashraf
Copy link

Hi @capuderg ,
I faced the same issue. I already fixed it and I sent a pull request. You can check that and you can merge it.
here is the pull request: #260

Basically, when we set an external plugin for a specific demo, it's not stored in the "set_plugins()" method. Because this plugin initially loaded all recommended/required plugins. But the conditions depended on Import Page Url. For that reason, those conditions do not work.

Thanks.

@masumskaib396
Copy link
Author

masumskaib396 commented Apr 25, 2022

It’s extracted the plugin.. The folder name is plumber-helper

@garousiamir
Copy link

@capuderg I have the same issue and @ashrafuddin765 is telling us that he has fixed it so it is good to merge his pull request since it's a big issue.

@wp-ashraf
Copy link

wp-ashraf commented May 11, 2022

@capuderg Since I'm not getting any response from your side. I'm going to close the pull request..

@capuderg
Copy link
Contributor

Hi @ashrafuddin765,

sorry for not replying sooner and thanks for preparing the PR.

Your PR includes too many code changes (code style changes), so please revert those, so I can review the actual code changes.

Thank you!

@wp-ashraf
Copy link

@capuderg, I updated the js file. please check and let me know if need any other changes..
Mainly I was edited 3 files: main.js, PluginInstaller.php and views/import.php .
#261

Thanks!

@capuderg
Copy link
Contributor

Hi @ashrafuddin765,

I'm still seeing a lot of code style changes that should not be in the PR (removed whitespace, indentation ...).

Please update the PR code to only include the actual code changes (no whitespace changes), so we can review it.

Take care!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants