Hi,

On a site using og-7.x-2.0-dev, when trying to link a content, the autocomplete form returns no results and sends following error:

HTTP status code: 500
Path: /ckeditor_link/autocomplete
StatusText: Internal Server Error

Comments

btopro’s picture

Status: Active » Needs work

most likely I didn't change the function og_get_group_context to og_context. Try that. Working on stabilizing d7 across my code base in the near future

pomliane’s picture

Unfortunately, it did not solve the issue: same 500 error.

btopro’s picture

Hmm.. can you try it with og 1.x? Not sure which to support yet as i'm new to OG in D7 and 2.x seems a bit new / unstable still

btopro’s picture

pushed some changes to dev, please check them out when it publishes tonight and let me know if it helped.

pomliane’s picture

Status: Needs work » Needs review
pomliane’s picture

Tanks a lot for your super fast answer! :)

HTTP status code: 500
Path : /ckeditor_link/autocomplete
StatusText: Internal Server Error
ResponseText : PDOException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.og_ancestry' doesn't exist: SELECT n.nid AS nid, n.title AS title
FROM 
{node} n
INNER JOIN {og_ancestry} og ON og.nid = n.nid
WHERE  (n.nid <> :db_condition_placeholder_0) AND (og.group_nid IS NULL ) AND (n.title LIKE :db_condition_placeholder_1 ESCAPE '\\') 
ORDER BY n.title asc, n.type asc; Array
(
[:db_condition_placeholder_0] => autocomplete
[:db_condition_placeholder_1] => %%%s%%
)
in ckeditor_link_og_ckeditor_link_autocomplete_alter() (line 38 in /modules/ckeditor_link_og/ckeditor_link_og.module).

In og-7.x-2.x:
- table "og_membership" seems to be the new "og_ancestor".
- "gid" replaces "group_nid"
- "og.nid" should probably be "og.etid"

Once these elements modified, the error message gets back to:

HTTP status code: 500
Path: /ckeditor_link/autocomplete
StatusText: Internal Server Error
ResponseText : 

I haven't tried your module on an og -7.x-1.x install yet, but, this issue looks like a feature request for og-7.x-2.x compatibility, doesn't it?

btopro’s picture

its probably an issue with both versions; 1.x and 2.x of 7 have schemas that are different from 6.x version so I'm sure that's the real issue. Will need to look into this at a later time once I play with OG in D7 (either version). A bit annoyed at how much tinkering has gone on with such a critical infrastructure project but oh well, if your able to generate more errors / find anything let me know. Definitely will support this module in D7, just need to get up to speed myself.

chris burge’s picture

Issue summary: View changes
StatusFileSize
new1.29 KB

Attached is patch for Drupal 7.x that supports OG 2.x.

btopro’s picture

Assigned: Unassigned » mmilutinovic1313
Priority: Critical » Major

Thanks for the patch. Looks reasonable but I'm going to have mmilutinovic1313 test it

mmilutinovic1313’s picture

I have applied Chris Burge's patch. It looks to be working and did not cause anything to break. Patch should be visable shortly. Message me if anything seems like it's not working or the patch doesn't apply.

Thanks!

Mark Milutinovic

mmilutinovic1313’s picture

Status: Needs review » Reviewed & tested by the community
btopro’s picture

Status: Reviewed & tested by the community » Fixed

mark - next time when you commit a patch set it to fixed and put the node id like this in the commit message -- #1576212

that way the commit shows up in this thread. Other then that awesome and this should be resolved, as well as another issues: http://cgit.drupalcode.org/ckeditor_link_og/commit/?id=f85c3af

Status: Fixed » Closed (fixed)

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