How I can Import a view to Drupal. I have an exported view that I need to import in a different Drupal Installation. I don't have an import option in the admin/structure/views?
Thanks!
Edit:
I have found the solution. I have to log in as user 1 to get this option.
Just follow the below steps for import/export a view in drupal 8. Goto configuration(admin/config). There under the development section we can find “configuration synchronization”, click on it(admin/config/development/configuration).
Go to the “Views settings” page under /admin/structure/views/settings and check the “Show the SQL query” option of the “Live preview settings.” Then you can go to any view and upon clicking the “Update preview” button you will see the SQL query issued by Drupal.
The views module allows administrators and site designers to create, manage, and display lists of content. Each list managed by the views module is known as a "view", and the output of a view is known as a "display". Displays are provided in either block or page form, and a single view may have multiple displays.
For D7, if you don't want to use user #1, you can enable the 'PHP filter' core module, and then give the relevant user role the 'Use PHP for settings' permission. Users with this role will then see an 'import' link next to the 'Add new view' link on the views admin page. Or you can go to the import page directly on /admin/structure/views/import
I have just discovered another reason this can happen - the Paranoia module being enabled. If enabled, /admin/structure/views/import
will display "You are not authorized to access this page", even if you are logged in as UID1.
Cool module. If it's enabled, you won't see it in the admin interface, even if you're logged in as UID1. You'll need to disable it with drush dis paranoia
or setting the status of it to 0 in the system table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With