This module provides an easy way to import previously exported Panels definitions.
Imports mini-panels, pages and page variants from corresponding subfolders.

The idea is that you could have a collection of commonly used panels in a folder. Then, when you start a project, copy the required panels definitions into this module and install. This will add all the panels in one go, saving you from using the Panels import form.

The project is located here: http://drupal.org/sandbox/mrded/1543076
D6 version: git clone --recursive --branch 6.x-1.x http://git.drupal.org/sandbox/mrded/1543076.git panels_import
D7 version: git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/mrded/1543076.git panels_import

Thank you!

Comments

mrded’s picture

Issue summary: View changes

fix mistake

patrickd’s picture

welcome,

Hmm, but why not using features for this? Is there a real advantage?

Also it's not a good practice to let other people change anything in your modules directory, as this makes it really hard to update because you can't just replace it with the updated version. rather use an external directory for this.

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page.

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
7.x-1.x: http://ventral.org/pareview/httpgitdrupalorgsandboxmrded1543076git
6.x-1.x: http://ventral.org/pareview/httpgitdrupalorgsandboxmrded1543076git-6x-1x

We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

regards

mrded’s picture

@patrickd

but why not using features for this? Is there a real advantage?

Yes, definitely! Features really great module, but it makes all in one. Sometimes it is difficult to maintain.

Example: If you have 10 panels then all this panels will export to one file. It means what:

  • If you want to remove one, then you will need to look for it in this file.
  • It will be very complicated to tracking changes via version control system.

it's not a good practice to let other people change anything in your modules directory, as this makes it really hard to update because you can't just replace it with the updated version. rather use an external directory for this.

It's really good idea! I can use sites/all/import folder! I will do it, thank you ;)

Also I'll try to sort my project page and code style ASAP.

Thank you!

mrded’s picture

  • Files for import is moved to sites/all/imports
  • Project page is looks better :)
misc’s picture

Status: Needs review » Needs work
Issue tags: -import, -panels +PAreview: security

I see some problems with this module:

* There are a lot of hard coded stuff - if you for instance works work installation profiles you are left outside.
* How does this work together with Features module?
* When you add content in pages/mini panels panels import does not check for dependencies, things are just broken if the dependent module is not active/missing.
* When you move or delete the page (.inc) that the import is done from, is disappears from the database.
* If you already have a panel with same name, it is overwritten by the imported panel, and it is marked as overridden, and when you revert it is the panel that is in the file that you have left.
* And how does this differ form how Features handles panels? On your project page you write "But it makes all panels in one file and sometimes it's very difficult to maintain." But that is not correct. And the maintain issues should be the same when you do it look you do with your module.
* No permission settings, if the module is activated, all panels and pages are imported (adding security tag for this, is not complete sure if that is accurate).
* If you add a view pane to add that to a panel, and export that panel - you do not get the view with it, so it is not going to show on the panel.

mrded’s picture

There are a lot of hard coded stuff - if you for instance works work installation profiles you are left outside.

You can just add it to dependencies[].
Also, I'll add multisite support #1588900: Multisite support

How does this work together with Features module?

This module can works separately, however we use it together.
For example: if the some module depends on the panel - we use Features. All uncertain panels use panels_import.

When you add content in pages/mini panels panels import does not check for dependencies, things are just broken if the dependent module is not active/missing.

It makes sense. I'll do it soon #1658822: Notification about dependent modules

When you move or delete the page (.inc) that the import is done from, is disappears from the database.

If panel is Overridden then after delete .inc file - panel is still in the database.

If you already have a panel with same name, it is overwritten by the imported panel, and it is marked as overridden, and when you revert it is the panel that is in the file that you have left.

This is expected behavior. Features module operates in a similar way.

And how does this differ form how Features handles panels? On your project page you write "But it makes all panels in one file and sometimes it's very difficult to maintain." But that is not correct. And the maintain issues should be the same when you do it look you do with your module.

Most important thing that you can put all your panels to one folder, and maintain them there.
It's very useful if you have a lot of panels without modules.
If you have panels owned by module - in this case it is better to use features.

No permission settings, if the module is activated, all panels and pages are imported (adding security tag for this, is not complete sure if that is accurate).

I don't see any reasons for security check, because this is expected behavior.

If you add a view pane to add that to a panel, and export that panel - you do not get the view with it, so it is not going to show on the panel.

It makes sense. I'll do it soon #1658862: Notification about dependent Views

Thank you :)

misc’s picture

It is quite contra productive of you if you say that something is not true when I have tested it and the behaviour were exactly experienced is what I write. I did not just make it up, you know :-) Someone else could test the same things...

Just of curiosity - how do you work with installation profiles if you add dependencies that are in sites/all? Then the installation profile is not self contained.

mrded’s picture

I'm so sorry if I offended you, I really did not want to do it :)
I think I understand what you mean about profiles. Now you can use 'sites/all' folder only. I'll fix it #1659072: Profiles support

Sorry again:)

misc’s picture

I was not offended, but your project are for a review, and it not so good idea to answer on a review with "that is not true"...

mrded’s picture

Status: Needs work » Closed (won't fix)
mrded’s picture

Issue summary: View changes

add git links