CiviCRM/tech notes: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(→‎XML data could not be loaded: Added code snippet and link to a relevant google search)
m (Text replace - "openfarmtech.org/forum" to "forum.opensourceecology.org")
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
* [http://wiki.civicrm.org/confluence/display/CRMDOC33/Moving+an+Existing+Installation+to+a+New+Server+or+Location Moving an Existing Installation to a New Server or Location]
* [http://wiki.civicrm.org/confluence/display/CRMDOC33/Moving+an+Existing+Installation+to+a+New+Server+or+Location Moving an Existing Installation to a New Server or Location]


==Common Errors==
==In a Nutshell==
You may need to delete the cache tables and the whole template cache folder to fix any potential issues. Use the code below as an example:


===XML data could not be loaded===
SQL code:<pre>
After moving CiviCRM from another host and updating some paths, I got this error:
USE civicrm_database_name;
TRUNCATE civicrm_acl_cache;
TRUNCATE civicrm_acl_contact_cache;
TRUNCATE civicrm_cache;
TRUNCATE civicrm_group_contact_cache;
TRUNCATE civicrm_prevnext_cache


''Fatal error: Uncaught exception 'Exception' with message 'XML data could not be loaded. Make sure you specified the correct path.' in
SELECT * FROM civicrm_preferences WHERE navigation LIKE '%<OLD-URL-FRAGMENT%'  
[...]
SELECT * from civicrm_menu WHERE breadcrumb LIKE '%OLD-URL-FRAGMENT%'
civicrm_invoke() #6 /home/a_user/site in /home/a_user/site/community/sites/all/modules/civicrm/packages/IDS/Filter/Storage.php on line 220''


[http://forum.civicrm.org/index.php?topic=4712.0 The solution] is to delete or update the contents of the file ''{DRUPAL_HOME}/sites/default/files/civicrm/templates_c/en_US/ConfigAndLog/'''Config.IDS.ini''' to reflect the new paths.''
</pre>
<ref name="Forum">[http://openfarmtech.org/forum/discussion/93/solved-xml-data-could-not-be-loaded-delete-config.ids.ini OSE forum post]</ref>


You may need to delete the whole template cache folder to fix the issue<ref>[http://www.google.com.br/search?hl=pt-BR&safe=off&q=Exception+%22XML+data+could+not+be+loaded%22+IDS_Filter_Storage+getFilterFromXML&oq=Exception+%22XML+data+could+not+be+loaded%22+IDS_Filter_Storage+getFilterFromXML&aq=f&aqi=&aql=&gs_sm=e&gs_upl=5415l5554l0l5811l2l2l0l0l0l0l0l0ll0 Google search]</ref>, though. Use the code below as an example:
<pre>
<pre>
cd $DRUPAL_HOME
cd $DRUPAL_HOME
rm -rv sites/default/files/civicrm/templates_c/*
rm -rv sites/default/files/civicrm/templates_c/*
</pre>
</pre>
==Common Errors==
===XML data could not be loaded===
After moving CiviCRM from another host and updating some paths, I got this error <ref name="Forum">[http://forum.opensourceecology.org/discussion/93/solved-xml-data-could-not-be-loaded-delete-config.ids.ini OSE forum post]</ref>:
''Fatal error: Uncaught exception 'Exception' with message '[http://www.google.com/search?q=Exception+%22XML+data+could+not+be+loaded%22+IDS_Filter_Storage+getFilterFromXML&oq=Exception+%22XML+data+could+not+be+loaded%22+IDS_Filter_Storage+getFilterFromXML XML data could not be loaded. Make sure you specified the correct path].' in
[...]
civicrm_invoke() #6 /home/a_user/site in /home/a_user/site/community/sites/all/modules/civicrm/packages/IDS/Filter/Storage.php on line 220''
[http://forum.civicrm.org/index.php?topic=4712.0 The solution] is to delete or update the contents of the file ''{DRUPAL_HOME}/sites/default/files/civicrm/templates_c/en_US/ConfigAndLog/'''Config.IDS.ini''' to reflect the new paths.''


===Menus retaining old URLs===
===Menus retaining old URLs===


In order to rebuild menu URLs after changing the base URL <ref>http://wiki.civicrm.org/confluence/display/CRMDOC33/Base+URL+Change</ref>, visit:
In order to rebuild menu URLs after changing the base URL <ref>http://wiki.civicrm.org/confluence/display/CRMDOC33/Base+URL+Change</ref>, visit:
civicrm/menu/rebuild?reset=1  
<pre>
index.php?q=civicrm/menu/rebuild&reset=1
OR
civicrm/menu/rebuild?reset=1  
</pre>


===Out of memory errors===
===Out of memory errors===
You might need to update the '''civicrm_domain''' table like this:
You might need to update the '''civicrm_domain''' table like this:
update civicrm_domain set config_backend = null WHERE id = 1
<pre>
update civicrm_domain set config_backend = null WHERE id = 1
-- OR --
TRUNCATE civicrm_domain;
</pre>


==References==
==References==

Latest revision as of 22:05, 2 July 2013

Moving

In a Nutshell

You may need to delete the cache tables and the whole template cache folder to fix any potential issues. Use the code below as an example:

SQL code:

USE civicrm_database_name;
TRUNCATE civicrm_acl_cache;
TRUNCATE civicrm_acl_contact_cache;
TRUNCATE civicrm_cache;
TRUNCATE civicrm_group_contact_cache;
TRUNCATE civicrm_prevnext_cache

SELECT * FROM civicrm_preferences WHERE navigation LIKE '%<OLD-URL-FRAGMENT%' 
SELECT * from civicrm_menu WHERE breadcrumb LIKE '%OLD-URL-FRAGMENT%'

cd $DRUPAL_HOME
rm -rv sites/default/files/civicrm/templates_c/*

Common Errors

XML data could not be loaded

After moving CiviCRM from another host and updating some paths, I got this error [1]:

Fatal error: Uncaught exception 'Exception' with message 'XML data could not be loaded. Make sure you specified the correct path.' in [...] civicrm_invoke() #6 /home/a_user/site in /home/a_user/site/community/sites/all/modules/civicrm/packages/IDS/Filter/Storage.php on line 220

The solution is to delete or update the contents of the file {DRUPAL_HOME}/sites/default/files/civicrm/templates_c/en_US/ConfigAndLog/Config.IDS.ini to reflect the new paths.

Menus retaining old URLs

In order to rebuild menu URLs after changing the base URL [2], visit:

index.php?q=civicrm/menu/rebuild&reset=1
OR
civicrm/menu/rebuild?reset=1 

Out of memory errors

You might need to update the civicrm_domain table like this:

update civicrm_domain set config_backend = null WHERE id = 1
-- OR --
TRUNCATE civicrm_domain; 

References