Display Suite Inception is a drag and drop layout manager that sits on top of Display Suite, and acts as a (near) full in-line replacement for the location and formatter settings of Fields provided by Field UI.

It brings with it a new 'Inception' content type, which allows for easy creation of one-off landing pages (i.e a site front-page) by allowing the population of regions provided by Display Suite with Blocks, Views, Markup, and Rendered Entities

It also allows for 'inception-enabling' entities, which lets you attach Blocks, Views, Markup and other rendered Entities into any region rendered using Display Suite on individual entities.

You may use Inception content as a layout template for other entities, via an inheritance model available to both Content Types and Taxonomy Vocabularies.

The full functionality of Inception is fairly complex, and perhaps better explained via the screencast available here: http://blog.firecannon.com/blog/display-suite-inception-v3-release

Project Page: https://www.drupal.org/sandbox/stooit/2196695
git clone: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/stooit/2196695.git ds_inception

Comments

jribeiro’s picture

First of all, we need to fix the automatic basic review issues:

Please, take a look at: http://pareview.sh/pareview/httpgitdrupalorgsandboxstooit2196695git

EDIT: removed pareview.sh dump.

stooit’s picture

Thanks, had run through pareview but wasn't sure how strict approval was on some of the warnings returned.

I'll clean it up and comment again when it's passing on these issues.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxstooit2196695git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

stooit’s picture

Issue summary: View changes

PAreview.sh is now returning a clean result.

I've also moved to a 7.x-1.x branch and removed the master branch.

stooit’s picture

Status: Needs work » Needs review
karan_mudi’s picture

Status: Needs review » Needs work

Automated Review

Review of the 7.x-1.x branch :

  • 
    FILE: /var/www/drupal-7-pareview/pareview_temp/ds_inception.class.inc
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1295 | ERROR | Unknown type hint "stdClass" found for $field_group
    --------------------------------------------------------------------------------
    
    
    

Manual Review

Add Implements hook_help() in your module file

klausi’s picture

Status: Needs work » Needs review

@mudi: The wrong type hint on its own is surely not an application blocker, anything else that you found or should this be RTBC instead?

rcodina’s picture

This module reminds me of Panopoly distribution but I think it's better given it is a simple module which adds features to Display Suite.

I have played with it and works like a charm. From my point of view, this module needs to improve its documentation to help users get used to it. I think that in README file there should be a link to the screencast because it is the fastest way someone can get started. A part form that, I think the hook_help should be implemented to add a help page inside drupal UI.

Manual Review

README.txt/README.md
[No: Does not follow] the guidelines for in-project documentation and/or the README Template:

I think this is not an application blocker, but it is a recommendation given the complexity of the module.

Keep up the good work!

stooit’s picture

Thanks for the support and detailed review, and completely agree on the current lack of documentation.

I'll tidy up the README and add a hook_help with some detailed help to get users started and respond again to this thread when done. I toyed with the idea of a 'guided overlay' for first timers too that acts as a walkthrough of the module functionality.

Cheers!

novitsh’s picture

Thank you for this module. I see myself using this!

Manual check:
Why are you prefixing functions like: _ds_inception_render_node()

iampuma’s picture

Status: Needs review » Needs work

I have tried installing the module twice, but every time I am getting this PDOException:

Column not found: 1054 Unknown column 'o.inception_type' in 'field list': SELECT o.inception_id AS inception_id, o.bundle AS bundle, o.inception_type AS inception_type FROM {ds_inception_overrides} o WHERE (o.bundle = :db_condition_placeholder_0) LIMIT 1 OFFSET 0; Array ( [:db_condition_placeholder_0] => page ) in _ds_inception_get_overrides() (line 577 of /var/www/nick-dev/sites/all/modules/ds_inception/includes/ds_inception.helpers.inc).

Describing the current ds_inception_overrides table, gives me an inception_entity_type, but not the inception_type

mysql> describe ds_inception_overrides;
+-----------------------+------------------+------+-----+---------+----------------+
| Field                 | Type             | Null | Key | Default | Extra          |
+-----------------------+------------------+------+-----+---------+----------------+
| id                    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| type                  | varchar(255)     | NO   |     | NULL    |                |
| bundle                | varchar(255)     | NO   |     | NULL    |                |
| entity_id             | int(10) unsigned | YES  | MUL | NULL    |                |
| inception_id          | int(10) unsigned | NO   |     | NULL    |                |
| inception_entity_type | varchar(128)     | NO   |     | NULL    |                |
+-----------------------+------------------+------+-----+---------+----------------+
6 rows in set (0.04 sec)

The module however looks great, can't wait to try it out more.

stooit’s picture

Sorry, that db error is completely my fault (introduced in commit b096805).

It was named the right thing (inception_type) for the upgrade hook, so I hadn't noticed. Fixed in the latest commit.

stooit’s picture

@Novitsh: I prefixed internal/private helper functions with an underscore, although this was more personal preference than Drupal coding standards. I'll happily change them if it's a blocker.

@rcodina: README has been updated to match template standards, and I'm using the hook_help example to pull the content into the UI. I still think the actual help content could do with some beefing up, I'll make sure that happens soon.

Thanks to all for the feedback and assistance with this application!

stooit’s picture

Status: Needs work » Needs review
iampuma’s picture

Okay great, I am not receiving the previous error anymore, but still having some minor issues:

  • Creating a new inception entity, gives following errors. It looks like the module is currently still having issues with multilingual websites, as my default profile is set up to be multilingual.
 179  30/Jan 09:11  info    sys  ds_inception module enabled.
                            tem
 180  30/Jan 09:13  notice  php  Notice: Undefined index: field_hide_title in locale_field_entity_form_submit() (line 438 of
                                 /var/www/inceptionds-dev/modules/locale/locale.module).
 181  30/Jan 09:13  notice  php  Notice: Undefined index: field_hide_breadcrumbs in locale_field_entity_form_submit() (line 438 of
                                 /var/www/inceptionds-dev/modules/locale/locale.module).
 182  30/Jan 09:13  notice  php  Notice: Undefined index: #language in locale_field_entity_form_submit() (line 438 of
                                 /var/www/inceptionds-dev/modules/locale/locale.module).
 183  30/Jan 09:13  notice  php  Notice: Undefined index: #language in locale_field_entity_form_submit() (line 438 of
                                 /var/www/inceptionds-dev/modules/locale/locale.module).
 184  30/Jan 09:13  notice  php  Notice: Undefined index: #language in locale_field_entity_form_submit() (line 438 of
                                 /var/www/inceptionds-dev/modules/locale/locale.module).
 185  30/Jan 09:13  notice  php  Notice: Undefined index: #language in locale_field_entity_form_submit() (line 438 of
                                 /var/www/inceptionds-dev/modules/locale/locale.module).
 186  30/Jan 09:13  notice  php  Notice: Undefined index: field_inception_merged_weights in locale_field_entity_form_submit() (line
                                 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
 187  30/Jan 09:13  notice  php  Notice: Undefined index: field_inception_generic in locale_field_entity_form_submit() (line 438 of
                                 /var/www/inceptionds-dev/modules/locale/locale.module).
 188  30/Jan 09:13  notice  con  inception: added Startpage.
  • In the Inception entity preview mode you can still drag around the fields, could be turned off.
  • Changing the current layout to another layout gives me the following
Notice: Undefined index: field_hide_title in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
Notice: Undefined index: field_hide_breadcrumbs in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
Notice: Undefined index: field_inception_html in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
Notice: Undefined index: field_inception_block in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
Notice: Undefined index: field_inception_view in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
Notice: Undefined index: field_inception_entity in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
Notice: Undefined index: field_inception_merged_weights in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
Notice: Undefined index: field_inception_generic in locale_field_entity_form_submit() (line 438 of /var/www/inceptionds-dev/modules/locale/locale.module).
  • Changing layouts does not allow transferring fields from current regions to the new regions like in Display Suite.
    This would be another great addition to the module, the DS code should be reusable for this functionality.
  • The code looks clean and safe + has sufficient comments in the include files.

Will definitely look forward using this module.

stooit’s picture

I've fixed the issues on multilingual Drupal installs where Locale is enabled. This was due to the Inception fields not being translatable, but in some areas it was allowing for language codes instead of always assuming LANGUAGE_NONE. Let me know if you spot any other issues on your multilingual profile.

Both suggestions (disable drag in preview mode, move fields to new regions when changing layout) would be great, I'll work on implementing both in the near future.

stooit’s picture

@impuma -- dragging is now disabled in Preview mode, thanks for the suggestion!

The latest commit also makes it more Panels-friendly, you can now use Panel layouts (including custom layouts) as well as those exposed by Display Suite. It also standardised CSS naming conventions throughout the module.

wiifm’s picture

Status: Needs review » Needs work

Hey Stuart,

Impressive module, DS is not my cup of tea, but I can review the code at least.

  1. Do you really need to unconditionally include 7 files on every page request - http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/ds_inception.modu... - this will significantly increase memory, from memory node.pages.inc is massive. I am wondering if you can load these when needed? I would be interested in a PHP memory comparison before and after this module ;)
  2. Super minor, but use SentEnCe case, try not to cap letters for fun http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/ds_inception.modu...
  3. Similar to point 1, all menu callbacks should be in a .admin.inc file http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/ds_inception.modu.... The default type is MENU_NORMAL_ITEM, so there is a lot of redundant code here
  4. Super nitpick, wrong comment style http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/ds_inception.inst...
  5. It is good form IMO that all variables should be prefixed with the module name http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/ds_inception.inst... - you can see how this can go wrong
  6. Instead of hook_form_alter() that runs on *every* form in the entire Drupal site http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/ds_inception.modu... try hook_form_FORMID_alter() that is more targeted.
  7. This whole string concatenation with HTML is messy, use a theme function (and/or a template) http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/includes/ds_incep...
  8. db_select() should be used where possible http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/includes/ds_incep... (on a related note you look like you are doing this query 3 times with a slightly different argument - function here?
  9. Missing t() http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/includes/ds_incep...
  10. user_access returns a bool, so this is weird http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/includes/ds_incep...
  11. Loading 200 nodes here? http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/includes/ds_incep... This is a terrible idea. On most sites - this will lead to a PHP WSOD. Can you explain/fix this.

That is as far as I got in the review.

Asides from that, it would be good to list the modules that this module will not work with (and ones it does work with nice). I would imagine this will be the first issues in your issue queue otherwise. I see you are overriding the node page callback http://cgit.drupalcode.org/sandbox-stooit-2196695/tree/ds_inception.modu... this will surely make some other Drupal module incompatible.

stooit’s picture

Thanks @wiifm, much appreciated. The latest commit has fixed the majority of these issues, performance should be vastly improved. There are still a couple includes in the .module file I need to move elsewhere but the main pain points are resolved.

The only thing left is to convert the string concatenation to theme functions. Will update this issue when done.

stooit’s picture

Status: Needs work » Needs review

Sorry for the major delay, have been a little swamped lately.

The latest commits replace concatenated string output with templates defined in hook_theme(), as well as a couple of minor bugfixes.

Sneakyvv’s picture

Status: Needs review » Needs work

Isn't this module's functionality similar to Page Manager en In-Place Editing? Perhaps edit this issue's summary and add an explanation as to why it's different/better, as suggested on https://www.drupal.org/node/1011698.

A detailed description of what your project does, including how it is different from other, similar projects, if applicable.

Automatic Review

Coder

ds_inception.js

Line 12: do not use mixed case (camelCase), use lower case and _ [style_camel_case]
    function refreshUpdateArray() {
Line 192: Javascript strings should be passed through Drupal.t(). [i18n_3]
                                    alert("Error changing layout: " + html.message);
Line 216: do not use mixed case (camelCase), use lower case and _ [style_camel_case]
    function handleDropzoneEvent(event, ui) {
Line 256: do not use mixed case (camelCase), use lower case and _ [style_camel_case]
    function handleDragStart(event, ui) {
Line 266: do not use mixed case (camelCase), use lower case and _ [style_camel_case]
    function handleDropEvent(event, ui) {

Manual Review

Individual user account
Follows the guidelines for individual user accounts.
No duplication
May cause module duplication and/or fragmentation. Might be similar to Page Manager en In-Place Editing. Please update the issue to explain the difference as
Master Branch
Follows the guidelines for master branch.
Licensing
Follows the licensing requirements.
3rd party assets/code
Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Does follow the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Follows the guidelines for project length and complexity.
Secure code
(*)DOES NOT meet the security requirements.
  • Your input field to add classes on blocks had a XSS vulnerability. Simple enter '><script>alert('XSS attack!');</script><div class=' to demonstrate it.
  • I couldn't identify the specific code that should be changed, but I suppose you will know where to use filter_xss().

Coding style & Drupal API usage
  1. (+) Complete the phpDoc with @return & @param statements (see https://www.drupal.org/node/1354#return). It's not entirely necessary for hooks or ctools plugin callback function etc., but is useful for your own functions.
  2. I wouldn't start a function with an empty line. This is not common in core nor contrib modules. It's also not consistently done.
  3. You don't need quotes for your description in your .info file.
  4. I don't know the history and usage of this sandbox module, but I would think that if the module is not released yet it wouldn't need update hooks in the .install module.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

This review uses the Project Application Review Template.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.