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

ImportForm not rendered #418

Open
shoosah opened this issue Apr 5, 2020 · 4 comments
Open

ImportForm not rendered #418

shoosah opened this issue Apr 5, 2020 · 4 comments

Comments

@shoosah
Copy link
Contributor

shoosah commented Apr 5, 2020

Although this issue raised before, this is not rendered again!
ImportSS4

@Cheddam
Copy link

Cheddam commented May 3, 2020

Hey @shoosah, could you provide some detail on which version of the module / Silverstripe CMS you're running? Additionally, since the linked issue was resolved by the user opening the search UI, could you confirm that the import form doesn't appear when you click the magnifying glass?

@shoosah
Copy link
Contributor Author

shoosah commented May 3, 2020

Hey @shoosah, could you provide some detail on which version of the module / Silverstripe CMS you're running? Additionally, since the linked issue was resolved by the user opening the search UI, could you confirm that the import form doesn't appear when you click the magnifying glass?

I'm using Silverstripe CMS: 4.5.2 and Module: 5.x-dev. I also confirm that clicking on the magnifying glass does not let me to import any workflow.

@sinan-evanshunt
Copy link

We are also encountering the same issue. Silverstripe 4.4 Module 5.2

@JamesDPC
Copy link

This is currently blocking importing an exported workflow, but I was able to get an import working by:

Modifying the model import class key (AdvancedWorkflowAdmin)

     private static $model_importers = array(
-        'WorkflowDefinition' => WorkflowBulkLoader::class
+        WorkflowDefinition::class => WorkflowBulkLoader::class
     );

Allowing the import button (AdvancedWorkflowAdmin), although still says "Import CSV":

-            $grid->getConfig()->removeComponentsByType(GridFieldImportButton::class);
+            // $grid->getConfig()->removeComponentsByType(GridFieldImportButton::class);

Fixing an issue with the export_filename_prefix + add Config class usage (WorkflowBulkLoader)

-        $default = WorkflowDefinitionExporter::$export_filename_prefix.'0.yml';
+        $default = Config::inst()->get(WorkflowDefinitionExporter::class, 'export_filename_prefix') . '0.yml';

In the project, adding mimetypes for yml/yaml:

SilverStripe\Control\HTTP:
  MimeTypes:
    yml: text/plain
    yaml: text/plain

I can add a PR if the ^^ seems like the right approach, the mimetype config would need to move into the module.

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

No branches or pull requests

5 participants