Hello,

Thanks great and very useful module!

I installed Context Help after I had installed Frequently Asked Questions http://drupal.org/project/faq .

Therefore a CCK content type faq already existed.

I got the following error on install

    * The content type faq already exists in this database.
    * Exiting. No import performed.

Is this supposed to happen or is there any compatibility issues with this module?

Also, I think it would be most helpful to clearly state this on the project page and readme.

Thanks,

-KH

Comments

darren.ferguson’s picture

Assigned: Unassigned » darren.ferguson

Ah i see the issue, i did not realize another module was utilizing the content type faq. I will have to go and change that to contexthelp_faq so that this is completely compatible and will not cause a problem with another module such as the faq module.

darren.ferguson’s picture

Status: Active » Closed (fixed)

Have added the fix for the content type too the cvs repository so the best way to do this will be to either upgrade or disable and enable.
Note i did not update the views via update code since it was causing problems, hence the best way would be to uninstall and re-install the module in order to get everything correct.

3dloco’s picture

Status: Closed (fixed) » Active

Hello Darren,

After your update I did an uninstall and reinstall and I get the following error:

user warning: Unknown column dbprefix_node_data_field_url.field_url_value in where clause query: 
SELECT node.nid AS nid, node.title AS node_title, node.language...
...WHERE node.type in ('contexthelp') AND node.language = 'en' AND 'admin/build/modules' LIKE dbprefix_node_data_field_url.field_url_value 

in /sites/all/modules/contexthelp/contexthelp.module on line 264.

Here is what I did:
1)Uninstalled the module
2) Deleted the content types left by this module.
3) flushed caches
4) reinstalled the module.

I think that this SQL error might be because on install the field URL is added to the content type Context Help but not for ContextHelp FAQ.


    * The content type Context Help has been added.
    * The field Url (field_url) was added to the content type Context Help.
    * The content type ContextHelp FAQ has been added.
    * Context Help module successfully installed.
    * The configuration options have been saved.

Also, I did change the status to open since it would be helpful to avoid confusion if you could state in the documentation/project page that the context help FAQ created by this module is different content type than the FAQ created by the FAQ module.

Thanks!

-KH

darren.ferguson’s picture

Yep, the system did not handle the content type correctly i have altered it so it correctly utilizes the content modules information so it can get the correct table.
http://drupal.org/cvs?commit=301088 is the cvs commit for this, it should now work correctly for you.

3dloco’s picture

Hello Darren,

I did an re-install and I am still getting the same error...no field url for the Context Help FAQ.

Thanks,

-KH

darren.ferguson’s picture

Status: Active » Closed (fixed)

Yep, see the error now it was caused by removing the views table name since it aliased the portion.

I have fixed this correctly now and added some small alterations for the button to be displayed or not displayed and some defaults for the content types

http://drupal.org/cvs?commit=301812 is the commit for this, and will hopefully make this the last and hence a 1.0 release provided nothing else occurs.

3dloco’s picture

Status: Closed (fixed) » Active

Hello,

Unfortunately I am still getting the same issue as in #3. I took a closer look at the error messages (sql queries) and the DB after a fresh install of the http://drupal.org/cvs?commit=301812. Below find more details.

1) Field URL for ContextHelp FAQ: On install I am still not getting a confirmation message that field URL was added to Context Help FAQ.

    * The content type Context Help has been added.
    * The field Url (field_url) was added to the content type Context Help.
    * The content type ContextHelp FAQ has been added.
    * Context Help module successfully installed.
    * The configuration options have been saved.

Also, when I checked the DB after install there is no table for ContextHelp FAQ (that is dbprefix_content_type_contexthelp does not exist).

2) SQL Errors: The sql queries change a bit when navigating to different admin areas, however the source of the error unknown column is still the same. Also, I don't see this column name anywhere else in the sql query but only at the very end, not even in the LEFT JOINs.

Basically, all the sql queries have this same pattern:

user warning: Unknown column 'dbprefix_node_data_field_url.field_url_value' in 'where clause' query: 

SELECT node.nid AS nid, node.title AS node_title, node.language AS node_language, node_data_field_url.field_url_value AS node_data_field_url_field_url_value, node.type AS node_type, node.vid AS node_vid, node_revisions.body AS node_revisions_body, node_revisions.format AS node_revisions_format 
FROM dbprefix_node node 


LEFT JOIN dbprefix_content_type_contexthelp node_data_field_url ON node.vid = node_data_field_url.vid 
LEFT JOIN dbprefix_node_revisions node_revisions ON node.vid = node_revisions.vid 


WHERE node.type in ('contexthelp') AND node.language = 'en' 
AND  (this is the part that changes, see all variations below)


in /.../sites/all/modules/contexthelp/contexthelp.module on line 267. 

Insert any of these portions above:

a) On the Home page after successful login

AND 'node' LIKE fpXmain_node_data_field_url.field_url_value

b) Under Site Configuration (/admin/settings)
AND 'admin/settings' LIKE dbprefix_node_data_field_url.field_url_value

c) Under Site Building (/admin/build)
AND 'admin/build' LIKE dbprefix_node_data_field_url.field_url_value

d) Under Site Building (/admin/build)
AND 'admin/content' LIKE dbprefix_node_data_field_url.field_url_value

e) Under URL Aliases (/admin/build/path)
AND 'admin/build/path/' LIKE dbprefix_node_data_field_url.field_url_value
AND 'search404' LIKE dbprefix_node_data_field_url.field_url_value

and so forth...

Thanks,

-KH

darren.ferguson’s picture

What version of CCK and views are you using for this. It looks like something is a miss with that. I believe the trunk we develop off has a slightly older version but confirming that would help since the ContextHelp FAQ should not have a field URL at all since it is FAQ's for the whole site. The ContextHelp node is the node that should have the pertinent field_url associated with it.

3dloco’s picture

Hello Darren,

I am using views 6.x-2.8 and cck 6.x-2.6

Thanks

KH

PS: Also I am using faq 6.x-1.10