Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Upon creating an installation profile, if I include colorbox in the list of modules to be enabled in hook_profile_modules, after the database is set up and the modules enabled, upon arriving at the Configure site page, javascript behavior is missing, in particular:
* When the Username field acquires focus, the E-mail address fails to copy the Site e-mail address.
* More importantly, the Clean URL test results are absent from the Server settings section and no option is available to select clean URLs.
Comment | File | Size | Author |
---|---|---|---|
#16 | colorbox-7.x-1.x-libraryapi-989590-9714620.patch | 10.34 KB | hswong3i |
#15 | colorbox_libraries_d6_989590.patch | 10.05 KB | frjo |
#15 | colorbox_libraries_d7_989590.patch | 8.84 KB | frjo |
#13 | colorbox-6.x-1.x-1297491055.patch | 11.63 KB | hswong3i |
#13 | colorbox-7.x-1.x-1297483755.patch | 16.76 KB | hswong3i |
Comments
Comment #1
victorkane CreditAttribution: victorkane commentedScreen captures with colorbox included / not included in the list of modules
Comment #2
frjo CreditAttribution: frjo commentedColorbox require jQuery Update 2.x as well as the Colorbox plugin, do you have these installed?
To automate the installation of the Colorbox plugin there is an Drush command as well as a Drush make file.
Comment #3
victorkane CreditAttribution: victorkane commentedThanks for responding so quickly!
Yes, I have all requirements fulfilled. The site is running fine (http://staging.projectflowandtracker.com/userstory/manage-business-model - click on the Conversation tab of the User story and then click on the image to see colorbox in action); I have all these same modules present for the install profile, and all modules are successfully enabled by the install profile. It's just that the described behavior continues. I did test many times, with and without colorbox. Both the required jquery update and colorbox libraries are present. Here is the list of modules (as in install profile):
function pft_profile_modules() {
$modules = array ('install_profile_api','admin_menu', 'adminrole', 'advanced_help', 'block', 'ctools', 'clone', 'color', 'jquery_update', 'comment', 'content', 'content_copy', 'bulk_export', 'ctools_custom_content', 'date_api', 'date_timezone', 'date_popup', 'date', 'dblog', 'diff', 'fieldgroup', 'filefield', 'filefield_sources', 'filter', 'path', 'help', 'imageapi', 'imageapi_imagemagick', 'imagecache', 'imagecache_ui', 'imagefield', /* issue 989590 Colorbox included in hook_profile_modules function of installation profile breaks javascript behavior of Configure site page 'colorbox', */ 'login_destination', 'menu', 'node', 'optionwidgets', 'text', 'number', 'og', 'og_access', 'og_actions', 'views', 'nodereference', 'jquery_ui','globalredirect', 'token', 'strongarm', 'system', 'taxonomy', 'nodereference_url', 'pathauto', 'update', 'user', 'userreference', 'vertical_tabs', 'og_views', 'views_attach', 'views_bulk_operations', 'views_content', 'views_export', 'views_ui', 'taxonomy_export', 'pft_basic');
return $modules;
}
Comment #4
frjo CreditAttribution: frjo commentedCould you test the current 6-dev release?
It has some Drupal.attachBehaviors() that maybe affect this.
Comment #5
victorkane CreditAttribution: victorkane commentedTested with latest 6.x-1.x-dev version, same results I'm afraid, no joy.
The anomaly can be recreated by downloading or cloning the 6.x-1.0-alpha1 branch from:
https://github.com/victorkane/ProjectFlowAndTracker
to obtain the complete installation profile ready to run.
Thanks!
Comment #6
hswong3i CreditAttribution: hswong3i commentedI face the same problem during development and debug with our pantarei-siren install profile (http://pantarei-design.com/projects/pantarei-siren), where configuration page display incorrectly.
I figure out that:
Therefore my solution is quite simple: NOT include any colorbox JS during install or upgrade page. Just with some additional case checking in colorbox_init() can solve this problem.
Moreover, colorbox is now hardcode its library default path as "sites/all/libraries/colorbox" (colorbox.module line 12) which is not install profile friendly. This can be improved with the use of Library API (http://drupal.org/project/libraries). This patch also include such changes as suggested to reCAPTCHA module (http://edin.no-ip.com/blog/hswong3i/patching-drupal-recaptcha-module-lib...).
Patch via colorbox-6.x-1.x-dev CVS, fully tested with pantarei-siren install profile (http://pantarei-design.com/projects/pantarei-siren).
Comment #7
hswong3i CreditAttribution: hswong3i commentedComment #8
hswong3i CreditAttribution: hswong3i commentedComment #9
hutch CreditAttribution: hutch commentedI have tested the patch in #6 and it installs cleanly and works very well. The form_set_error message could be more explicit about what the user needs to do to resolve the issue, possibly with a link to a help page provided by a new function colorbox_help(), for those who have not read the README.
The libraries module option looks sensible, I heven't tested it in a multisite setup but I'm sure it would work there too.
Comment #10
hswong3i CreditAttribution: hswong3i commentedI would like to leave the handling of error message to original author, since this may need to be update together with other else documents.
Moreover, any idea to include this patch into next beta release?
Comment #11
hswong3i CreditAttribution: hswong3i commentedHere is an improved version target for Drupal 7.x Colorbox, with better colorbox_requirements() implementation.
Moreover, this patch also simplify some dummy error message handling, plus coding style cleanup with coder.module.
Finally, it also synchronize coding style with that of patching getid3.module with Drupal 7.x Library API support (http://drupal.org/node/173616).
Comment #12
thill_ CreditAttribution: thill_ commentedSome great fixes here for those of us using install profiles, this fixes colorbox completely killing our install because the library was at profiles/
/libraries instead of sites/all/libraries where it was looking for it.
thank you for the work on this
Comment #13
hswong3i CreditAttribution: hswong3i commentedA renew version for both colorbox-6.x-1.x-dev and colorbox7.x-1.x-dev. It is now included in our PantaRei Siren installation profile (http://drupal.org/project/pantarei_siren) with manual hack synchronize. Fully tested with both Drupal 6/7 fresh installation.
May someone provide a kindly review of this issue so we can get fixed within official version?
Comment #14
andypostSuppose it's better to assign result to a variable to not execute colorbox_get_version() twice
Powered by Dreditor.
Comment #15
frjo CreditAttribution: frjo commentedHere are my suggestions for patches, one for D6 and one for D7.
@hswong3i, would these work in your situation? I have taken a lot from your patches but feel that my versions are cleaner.
If you depend on the "HACK: If libraries api module is not installed but available, load it." I will add it back in.
Sorry it took so long time to review this!
Comment #16
hswong3i CreditAttribution: hswong3i commented@frjo: Thank you for your review. The "HACK" section is quite useful since during installation Library API may not even enabled yet and so not able to detect the correct library path.
I give a reroll of my origin patch from #13, with new GIT patch instruction as http://drupal.org/node/632214/git-instructions.
It is not a colorbox-specific implementation: I use this coding style for other similar patch, e.g. http://drupal.org/node/173616. Please feel free to refine my suggestion according to the needs of colorbox :D
Tested with my latest pantarei-design.com/files/pantarei-siren-7.0-dev.tar.gz, installation pass without error message.
Comment #17
frjo CreditAttribution: frjo commentedCommitted #15 to 6-dev.
Comment #18
frjo CreditAttribution: frjo commentedCommitted #15 to 7-dev.
Comment #19
frjo CreditAttribution: frjo commentedPatch part of beta4/beta11.