Open ericras opened 11 years ago
Dumb module thinks the first imce profile should only be editable by the site's first user
imce/inc/imce.admin.inc
function imce_profile_operations($op = 'add', $pid = 0) {
//add-edit
if ($pid != 1 || $GLOBALS['user']->uid == 1) {
return drupal_get_form('imce_profile_form', $pid);
}
drupal_access_denied();
}
Went in and updated it to 1920x1200 on unlcms.unl.edu by temp adjusting the code above then reverting the change.
IMCE settings/User-1 profile isn't shared, needs to be done on every site
Share the IMCE table(s)?
What IMCE tables? IMCE just uses imce_* variables.
Here's a query to change it to 1920x1200
UPDATE variable
SET value = replace(CONVERT(value USING utf8), '1200x1200', '1920x1200')
WHERE name = 'imce_profiles'
AND value LIKE '%1200x1200%';
This worked for me on my dev machine to update all sites:
drush @sites sqlq --db-prefix "UPDATE {variable}
SET value = replace(CONVERT(value USING utf8), '1200x1200', '1920x1200')
WHERE name = 'imce_profiles'
AND value LIKE '%1200x1200%';"
Running this on staging didn't work, fuuuuuuu-----
cd /var/www/htdocs
php sites/all/modules/drush/drush.php @sites sqlq -v --db-prefix "UPDATE {variable} SET value = replace(CONVERT(value USING utf8), '1200x1200', '1920x1200') WHERE name = 'imce_profiles' AND value LIKE '%1200x1200%';"
Running it locally works.
Running the mysql UPDATE query (https://github.com/unlcms/UNL-CMS/issues/777#issuecomment-30445409) on a single site's variable table works on staging.
Also, running drush on staging targeting a single site works:
php sites/all/modules/drush/drush.php -l http://unlcms-staging.unl.edu/chancellor/commencement/ sqlq -v --db-prefix "UPDATE {variable} SET value = replace(CONVERT(value USING utf8), '1200x1200', '1920x1200') WHERE name = 'imce_profiles' AND value LIKE '%1200x1200%';"
hmmm, on staging if you run
php sites/all/modules/drush/drush.php @sites status
it shows the Site Path as sites/default for every site
/var/www/bin/drush-all-sites.php status seems to work just fine, use that instead
This has just been run on production.
Not fixed on yet-to-be-created sites
Problem: this settings page isn't accessible! https://unlcms.unl.edu/admin/config/media/imce/profile/edit/1/