I'm trying to set up a site from Aegir on the OpenPublish platform (http://www.opensourceopenminds.com/openpublish/download).
The platform codebase has been set up, and Aegir verified it successfully. Here's the log:
Task starts processing
Running: php /var/aegir/drush/drush.php --root='/var/aegir/platforms/openpublish-1.0-292' 'provision' 'verify' --backend
Drush bootstrap phase : _drush_bootstrap_drush()
opendir(/var/aegir/.drush/provision/provision.tmp): failed to open dir: Permission denied
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Initialized Drupal 6.12 root directory at /var/aegir/platforms/openpublish-1.0-292
Found command: provision verify
Initializing drush commandfile: provision_apache
Undefined index: base_url
Initializing drush commandfile: provision_drupal
Initializing drush commandfile: provision_mysql
Undefined index: db_url
Including /var/aegir/.drush/provision/web_server/verify.provision.inc
Including /var/aegir/.drush/provision/platform/verify.provision.inc
Including /var/aegir/.drush/provision/db_server/verify.provision.inc
Virtual host configuration path exists.
Virtual host configuration ownership of path has been changed to aegir.
Virtual host configuration permissions of path have been changed to 0700.
Virtual host configuration path is writable.
Generating apache host configuration file platform_1550.conf.
Apache has been restarted
Provision configuration path exists.
Provision configuration ownership of path has been changed to aegir.
Provision configuration permissions of path have been changed to 0700.
Provision configuration path is writable.
Backup path exists.
Backup ownership of path has been changed to aegir.
Backup permissions of path have been changed to 0700.
Backup path is writable.
Drupal sites directory is writable by the provisioning script
Undefined variable: sites
This platform is running drupal 6.12
Including non-version specific file : /var/aegir/.drush/provision/platform/drupal/packages.inc
Undefined index: project
Undefined index: project
Undefined index: project
Undefined index: project
Undefined index: project
Undefined index: project
Undefined index: project
Found 151 modules in base
Undefined index: project
Found 10 themes in base
Undefined property: stdClass::$info
Found install profile openpublish
Undefined index: project
Mysql can create new databases.
Generating drushrc.php file
Could not change permissions of drushrc.php to 384 (chmod to 600 failed on /var/aegir/platforms/openpublish-1.0-292/drushrc.php)
Drushrc file (/var/aegir/platforms/openpublish-1.0-292/drushrc.php) was written successfully
Changed permissions of drushrc.php to 0400
Command dispatch complete
Removing task from hosting queue
Command dispatch complete
<code>
However, when I go to create a site the following happens:
1. I go to create content/site
2. I type in the domain name, site admin email.
3. I select 'open publish' as the platform
4. via ajax/ahah it loads a language option. The radio button for 'english' is default.
5. I click save
At this point Aegir gives the error:
"Install Profile Field is required"
Now there is an install profile section of the form, displaying all install profiles on the system - default, acquia, prosepoint - but not openpublish.
Running the following query on the hostmaster database:
<code>SELECT n.nid, n.title FROM node n LEFT JOIN hosting_package p ON n.vid = p.vid WHERE p.package_type = 'profile';
Shows the following:
46 default
47 hostmaster
131 acquia
136 prosepoint
1268 atrium_installer
but no entry for 'openpublish' - yet it says it found the openpublish profile in the platform verify.
Here is the code of the openpublish.profile file:
<?php
/**
* Implementation of hook_profile_details()
*/
function openpublish_profile_details() {
return array(
'name' => 'OpenPublish',
'description' => st('The OpenPublish profile installs the semantic platform for publishers.'),
);
}
/**
* Return a list of tasks that this profile supports.
*
* @return
* A keyed array of tasks the profile will perform during
* the final stage. The keys of the array will be used internally,
* while the values will be displayed to the user in the installer
* task list.
*/
function openpublish_profile_task_list() {
global $conf;
$conf['site_name'] = 'OpenPublish';
$conf['theme_settings'] = array(
'default_logo' => 0,
'logo_path' => 'profiles/openpublish/logo.png',
);
return array('api-info' => st('Calais API Key'));
}
/**
* Implementation of hook_profile_modules()
*/
function openpublish_profile_modules() {
$core_modules = array(
// Required core modules.
'block', 'filter', 'node', 'system', 'user',
// Optional core modules.
'dblog','blog', 'comment', 'help', 'locale', 'menu', 'openid', 'path', 'ping',
'profile', 'search', 'statistics', 'taxonomy', 'translation', 'upload', 'install_profile_api'
);
$contributed_modules = array(
//misc stand-alone, required by others
'admin_menu', 'rdf', 'token', 'gmap', 'devel', 'flickrapi', 'autoload', 'apture',
'fckeditor', 'flag', 'imce', 'login_destination', 'mollom', 'nodewords', 'paging',
'pathauto', 'tabs',
//date
'date_api', 'date', 'date_timezone',
//imagecache
'imageapi', 'imageapi_gd', 'imagecache', 'imagecache_ui',
//cck
'content', 'content_copy', 'content_permissions', 'emfield', 'emaudio', 'emimage',
'emvideo', 'fieldgroup', 'filefield', 'imagefield', 'link', 'number',
'optionwidgets', 'text', 'nodereference', 'userreference',
// Calais
'calais_api', 'calais', 'calais_geo', 'calais_tagmods',
// Feed API
'feedapi', 'feedapi_node', 'feedapi_inherit', 'feedapi_mapper', 'parser_simplepie',
// More Like this
'morelikethis', 'morelikethis_flickr', 'morelikethis_googlevideo', 'morelikethis_taxonomy',
'morelikethis_yboss',
//swftools
'swftools', 'swfobject2', 'flowplayer3',
//views
'views', 'views_export', 'views_ui',
//topic hubs
'panels', 'panels_node', 'panels_node_content', 'panels_views',
'topichubs', 'topichubs_calais_geo', 'topichubs_contributors', 'topichubs_most_comments',
'topichubs_most_recent', 'topichubs_most_viewed', 'topichubs_panels', 'topichubs_recent_comments',
'topichubs_related_topics',
// Custom modules developed for OpenPublish
'openpublish_administration', 'popular_terms', 'openpublish_views',
);
return array_merge($core_modules, $contributed_modules);
}
/**
* Implementation of hook_profile_tasks().
*/
function openpublish_profile_tasks(&$task, $url) {
if($task == 'profile') {
$task = 'api-info';
drupal_set_title(st('Calais API Configuration'));
return drupal_get_form('calais_api_info', $url);
}
if($task == 'api-info') {
// This takes a long time, so try to avoid a timeout.
if (ini_get('max_execution_time') < 240) {
set_time_limit(240);
}
// Save values from the API form
$form_values = array('values' => $_POST);
system_settings_form_submit(array(), $form_values);
_openpublish_log(t('Kicking off installation'));
install_include(openpublish_profile_modules());
drupal_set_title(t('OpenPublish Installation'));
drupal_set_title(t('OpenPublish Installation'));
_openpublish_base_settings();
_openpublish_set_cck_types();
_openpublish_initialize_settings();
_openpublish_placeholder_content();
_openpublish_set_views();
_openpublish_modify_menus();
_openpublish_setup_blocks();
menu_rebuild();
cache_clear_all();
$task = 'profile-finished';
}
}
function calais_api_info($form_state, $url) {
$form = array();
$form['calais'] = array(
'#type' => 'fieldset',
'#title' => t('Calais Configuration'),
'#collapsible' => FALSE,
);
$calais_url = array(
'!calaisurl' => l(t('Need One'), 'http://www.opencalais.com/user/register', array('attributes' => array('target' => '_blank'))),
);
$form['calais']['calais_api_key'] = array(
'#type' => 'textfield',
'#title' => t('Calais API Key'),
'#default_value' => $form_state['values']['calais_api_key'],
'#size' => 60,
'#description' => t('Required to utilize the Calais service. !calaisurl?', $calais_url),
);
$maxtime = ini_get('max_execution_time');
$form['calais']['message'] = array(
'#type' => 'markup',
'#value' => t('The next step, configuring your OpenPublish site, can take quite some time to complete. Please bear with us. Make sure your PHP setting for max_execution_time is 60 or greater. It is currently set to @time. We will also try setting it automatically, but server security settings might not allow it.', array('@time' => $maxtime)),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => st('Save and continue'),
);
$form['#action'] = $url;
$form['#redirect'] = FALSE;
return $form;
}
function calais_api_info_submit($form, &$form_state) {
// Don't think this ever gets called.
}
/**
* First function called by install process, just do some basic setup
I haven't included the rest of the file, as I don't think the rest would affect it - as aegir doesn't get as far as the profiles callback functions.
Any help much appreciated!
Comments
Comment #1
steveparks commentedDamn I'm a fool - missed the / from the tags. Wish it would let me edit!
Sorry guys
Comment #2
Anonymous (not verified) commentedSo Adrian's pointed out that this is due to Drupal's single namespace system: If you have a component called 'openpublish' (like the profile), and a module or theme called 'openpublish' (in this case, there's a theme called openpublish), this makes Drupal rather unhappy.
I installed OpenPublish and the drushrc.php of the platform is here. So as you can see the profile is picked up and recorded, but I guess goes wrong somewhere else down the line.
To fix it, I renamed the profile from 'openpublish' to 'openpublish_profile', renamed openpublish.profile to openpublish_profile.profile, and did a search and replace on functions inside it (just to be on the safe side) to match. Could've done the reverse, to the theme, but too many references to the theme as 'openpublish' are made (particularly in the install profile itself)
Did another re-verify, and all well and good, sites can be provisioned.
This unfortunately isn't very good, because you'll have to do this sort of thing again if you want to upgrade the platform. Perhaps it should be brought to OpenPublish's attention, that it's bad form to have multiple components with the same namespace!
Also check your memory_limit in your php cli php.ini. This profile takes longer to do its thing than even OpenAtrium. Mine installed ok with 128MB of memory allocated to php.
Comment #3
steveparks commentedHi mig5 - fantastic, thanks.
I'll try that out. I'll also pass it back to the developers.
And yes - I have my memory_limit set to 128M since installing Atrium! :)
cheers
Steve
Comment #4
lloydpearsoniv commented"To fix it, I renamed the profile from 'openpublish' to 'openpublish_profile', renamed openpublish.profile to openpublish_profile.profile, and did a search and replace on functions inside it (just to be on the safe side) to match."
i tried it & it didnt work for me....what am i doing wrong?
or can i have a copy of your openpublish_profile.profile ???
Comment #5
Anonymous (not verified) commentedDid you reverify the Platform after you replaced all the functions in the openpublish_profile.profile?
If so, pastebin your profile code to drupalbin.com and send a link.
Comment #6
lloydpearsoniv commentedyes, i did reverify it.
but i figured out what i did wrong
Comment #7
Anonymous (not verified) commentedThen we can close this again.
Comment #8
dave reidMoving to the Open Publish issue queue then, since this has nothing to do with Aegir. Not sure why this issue started as 'closed' as well...
Comment #9
dave reidComment #10
irakli commentedCan somebody explain what "makes unhappy" means in "[having themes, modules etc. named the same way] makes Drupal rather unhappy"? I've never seen this being a problem anywhere in Drupal except in Aegir. Maybe it's just me, but would be helpful to know what exactly is the problem.
I am also unsure what "single namespace in Drupal" means. System table does have a type differentiating themes with some name from module with the same name etc.
We could just rename things in OP, but there're many installation already running on OP and we don't want to break those, without fully understanding what Aegir's issue is in this case.
Any clarification would be highly appreciated.
Comment #11
irakli commentedComment #12
socialnicheguru commentedwhich functions did you rename in @2?
Comment #13
febbraro commentedIn 1.6 an beyond the theme was renamed to openpublish_theme. This should no longer be an issue.