In my logs I get the following error:

TypeError: entityElement.get(...) is undefined
http://demo/sites/all/modules/core/contrib-oa-sng-1/edit/js/edit.js?v=7.25
Line 222

the line at 222 is ".get(0)"

 if (entityElement.length === 0) {
     entityElement = $('.region-content').find(entityElementSelector);
}
var entityInstanceID = entityElement
.get(0)
.getAttribute('data-edit-entity-instance-id'); 

I placed this code from the readme in oa_radix template.php file:

/*
 * Edit module fix
 * https://drupal.org/comment/8310093#comment-8310093
 * function exampletheme_preprocess_region(&$variables, $hook)
 */

function oa_radix_preprocess_region(&$variables, $hook) {
  // Don't use Zen's region--no-wrapper.tpl.php template
  // @see https://drupal.org/node/1728134
  if (strpos($variables['region'], 'content') === 0) {
    $variables['theme_hook_suggestions'] = array_diff($variables['theme_hook_suggestions'], array('region__no_wrapper'));
  }
}

Comments

SocialNicheGuru’s picture

Issue summary: View changes

fixed formatting

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Active » Postponed (maintainer needs more info)

So the "content" region (with a class="region-content" piece of HTML) does show up? Edit's Status Report doesn't complain?

SocialNicheGuru’s picture

region-content is defined in system/stylesheet/screen.css
but the class value,'class="region-content"', is not given in node.tpl.php or panels.tpl.php.

on the article content type that is not panelized, the edit in the contextual link goes to the regular node edit page not the in place editing.

Wim Leers’s picture

D'oh, I didn't see this reply! Please mark an issue back as active once you've replied, otherwise I won't see it :)

This is not at all related to CSS. Please check your status report, and look at the resulting HTML, not the actual templates.

Wim Leers’s picture

Category: Bug report » Support request
SocialNicheGuru’s picture

Thanks. here is what is part of source:

<body class="html not-front logged-in no-sidebars page-node page-node- page-node-1 node-type-oa-space og-context og-context-node og-context-node-1 node-promoted region-content" >
Wim Leers’s picture

I'm afraid d.o stripped it out. You'll have to wrap it in <code> tags!

SocialNicheGuru’s picture

and for the main area further down I see:

<a id="main-content"></a>
                    <h1 class="title" id="page-title"><div data-edit-field-id="node/1/title/en/full">MY Title HERE</div></h1>                                                    <div class="region region-content">
    <div id="block-system-main" class="block block-system">
SocialNicheGuru’s picture

I applied the fix ie. adding the suggestion to the template.php file.
I have this now but I still get the error:

OK
Edit: Backbone library Exists & compatible
OK
Edit: CKEditor library Exists, compatible and correct location
OK
Edit: CKEditor's "Shared Space" plugin is included Included
OK
Edit: Underscore library Exists & compatible
OK
Edit: theme compatibility The theme appears compatible

SocialNicheGuru’s picture

Status: Postponed (maintainer needs more info) » Active
Wim Leers’s picture

#8: so you have *two* .region-content DOM nodes! That's not possible, unless you manually added that class to one of the two yourself. I bet you set it manually on the <body> tag, because it should not appear on that one.

#9: I don't see any error in there? :)

Wim Leers’s picture

Status: Active » Fixed

Great news for you: I just committed #2178103: Stop requiring a content region wrapper + "region-content" class for maximum theme compatibility, which changes Edit to no longer require the content region wrapper to exist! Therefor, you can upgrade to the latest dev snapshot of Edit, or RC2 (I'll release RC2 later today probably), undo your changes to your theme, and not have to worry about this again :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

goudal’s picture

I have downloaded the 7.1.0 version and I still have the bug on get(0)

I have added a test to return when entityElement.get(0) is not defined and it works... but.. dirty workaround.