Hi,
I'm trying to use ckeditor_link_og-6.x-1.x-dev with og-6.x-2.3 and ckeditor_link-6.x-2.2 with no luck: there are never any results returned.

Thanks to a user warning: Table 'db.book' doesn't exist query, I've noticed JOIN {book} b ON b.nid=n.nid WHERE b.nid<>b.bid in the db_rewrite_sql() query and thought it could explain things.
Unfortunately, there are no results either with the book module enabled.

Once ckeditor_link_og is disabled, ckeditor_link gets back to a working state i.e returns suggestions.

Comments

btopro’s picture

Status: Active » Needs review

good catch, this is a hold over form when this code was abstracted from the ELMS distribution and had a hatred for book roots :) Pushed this change to dev. Let me know if it's working once it publishes (probably tonight)

pomliane’s picture

Thank you, the warning is gone.

Unfortunately, still no results returned.
Apparently, og_get_group_context() fails to find a context and $group->nid is empty.

With a static value in place of $group-> nid in db_query_range(), accurate results are returned.

On this install, Organic groups access control and Content Access are enabled, might one of these be the source of this issue? I'm going to test it very soon and report back.

btopro’s picture

Priority: Critical » Normal

hmm... so the content isn't in a group then? I think there's a module to integrate the two but not positive. The query rewrite in D6 branch will take into account node access mechanisms so their could possibly be a conflict... too complex to say :p

pomliane’s picture

All contents I tested are in one (and only) group, but, for a reason I can't figure out, group context still seems undefined according to the result of dpm($group->nid) just before the return statement of ckeditor_og_link.module.

Same thing on a brand new install with only required core modules + og, ckeditor, ckeditor_link and ckeditor_link_og—patched according to your last commit—enabled.

btopro’s picture

hmm... maybe try rebuilding your node access settings? Something odd sounds like it's going on if og_get_group_context isn't valid :\

pomliane’s picture

I had the issue on a first site with different access control mechanisms but I just set up a brand new install—on another server—with no contrib module at all except og, ckeditor, ckeditor_link and ckeditor_link_og—not even one optional core module.

There's no access control or anything. I really don't know what to rebuild? :/

btopro’s picture

hmmm... immediate thought is that the call is ajax and that the arguments / scope will not be within og. I typically use spaces which helps maintain this so that could be part of the issue... the node id should be set correctly (I'd hope).

Maybe we could grab the nid that comes across, then load it, and then limit the results to the og_groups attribute of node. Thoughts? This would work across other types of more complex systems as well bc the active node SHOULD include what group it's a part of (or there are larger issues)