How to install eComma with Panelizer?
These instructions integrate the eComma 7.x-1.x installation instructions, but with your requested modifications to make them work with Panelizer.


Create a basic installation of Drupal for your local development. You need to use MySQL / MariaDB as your database, eComma won't work with PostgreSQL at the moment [reason].
Install eComma (assuming you use drush, which is a great tool for Drupal developers …):

drush dl ecomma
drush en ecomma

If you want to install the module in a way that allows you to contribute back with Github pull request, replace the content of the eComma module with the Github repository's 7.x-1.x branch:

cd &lt;your_docroot&gt;/sites/all/modules/;
rm -R ecomma/*;
git clone "https://github.com/coerll/eComma.git" -b 7.x-1.x --single-branch ./ecomma

Install the patch mentioned in the eComma README. It fixes Community Tags' Drupal issue #2193175, which otherwise leads to Server Error 500 on node view pages (/node/&lt;some-node-id&gt;).

cd sites/all/modules/community_tags
wget "https://www.drupal.org/files/issues/community_tag_tagadelic_d7_fix-2193175-4.patch"
patch -p1 &lt;"community_tag_tagadelic_d7_fix-2193175-4.patch"
rm "community_tag_tagadelic_d7_fix-2193175-4.patch"

Go to "Administration → Configuration → Search and metadata → Clean URLs" (/admin/config/search/clean-urls) and select "Enable clean URLs".
Go to "Structure → Taxonomy → Add Vocabulary" (/admin/structure/taxonomy/add) and add a vocabulary.
Add or edit the custom content type that you want to use eComma on.
In the edit form of that content type, go to the horizontal tab "Comment settings" and set "Preview comment: Optional".
Go to "Manage fields" for your content type (/admin/structure/types/manage/content-type-name/fields) and add a new field.


Use field type "Long text" (it will only work with that, not with "Long text and summary").
Go to the field settings. If you problems doing so (like "Notice: Undefined index: instance in ecomma_form_alter() (line 351 of …/ecomma.module).", you can manually enable eComma for the field in the database instead of doing the next two steps. You would use a query like:

INSERT INTO ecom_ecomma_field_enabled (field_name, content_type_name, ecomma_enabled)
VALUES (''your_field_name", "your_content_type", TRUE);

In the field settings, use "Number of value: unlimited" (though that's probably not obligatory).
In the field settings, select "Enable ecomma commentary features", right above the "Save settings" button.

Again, go to "Manage fields" for your content type (/admin/structure/types/manage/content-type-name/fields) and add a new field of field type "Term reference", using the "Autocomplete term widget" and selecting your Vocabulary from the field settings.
Go to "Configuration → Content Authoring → Community tags" and select "Enable community tagging" for the new vocabulary that you created.
Go to "Configuration → jQuery update → jQuery and jQuery UI CDN" and select "None".
Edit your eComma content type again, there go to the horizontal tab "Community tags settings" and select "Community tagging form: Block".
Go to "People → Permissions" and


Check "Community Tags: tag content" for authenticated and anonymous users. This will also enable unauthenticated users to see the tags, but not to tag.
Check "Community Tags: edit own tags" for authenticated users.
Check "Comment: view comments" for anonymous and authenticated users. This will enable unauthenticated users to see the comments, but not to comment.

Configure Drupal to show the "Long text" text field of your new content type, plus various eComma blocks, when somebody views a node of that content type. Depending on what layout mechanism you use (vanilla Drupal, Panels / Panelizer, Display Suite, context etc.) this will be different. Here's how to do it for Panelizer:


Go to "Administration → Structure → Pages", enable "Node template" and edit it.
In the node template, create a new variant of type "Panel", with the optional feature "Selection rules".
Add a new selection rule for your new variant, and doing so choosing "Node: type" from the dropdown list and later the content type(s) which you want to use with eComma.
Go to the "Content" section of your new variant, click a gear icon where you want to add content, choose "Add content" from the dropdown.
In the content selection dialog, go to the "Node" tab and select the Long Text type field you want to use eComma on (it starts with "Field: …" in this list). The eComma annotation dialog will not appear if you add this field as part of an aggregate, like by putting in the full rendered node with this dialog!
Click the gear icon again, click "Add content", and now from the Miscellaneous tab of the dialog, one by one, add the "Community tagging form" block and all blocks starting with "eComma". Normally these blocks are nicely integrated into overlapping tabs in eComma, but I could not yet find out how to achieve this with Panelizer. The "Community tagging form" block is needed because if not adding it, it will not appear as part of the JavaScript tagging form either!
Save this all.

Test your setup.


Create a node of your new content type.
Enter some text in the "Long text" text field – not in the "Body" text field. And save.
View the node and select text with mouse cursor to start annotating it.