In WYSIWYGPro Settings->File Management

File settings
Enable user-specific file management

I check this box, then click on "save configuration". The box comes back unchecked. No error message in logs or in file server.

Can someone tell me what's wrong?

Thanks!

Comments

webchuck’s picture

I've never seen this problem. Which version are you using? And did you download the module from drupal.org or from the WysiwygPro site?

Thanks,
Chuck

somebodysysop’s picture

Downloaded the Drupal package from WysiwygPro site which was avaiable after purchase.

somebodysysop’s picture

I just took a look at the code in wysiwygpro.module, and this variable, variable_get('wpro_file_management', '') doesn't appear to be referenced anywhere other than here:


	$form['wpro_files']['wpro_private_files'] = array(
		'#type' => 'checkbox',
		'#title' => t('Enable user-specific file management'),
		'#default_value' => variable_get('wpro_file_management', ''), 
		'#description' => t('Enable this feature if you would like all users to have access to the same files. This is disabled by default, giving users access to only their files.'),
	);

Also, wpro_file_management does not appear in the Drupal "variables" table at all.

Finally, I don't understand the language of this setting when you really get down to it. The setting says "Enable user-specific file management". This makes me think that you click on this to enable the ability for users to see only their files. However, the description says "Enable this feature if you would like all users to have access to the same files. This is disabled by default, giving users access to only their files.". To me, these two statements appear to contradict each other. What I know for sure is that right now, all of my users can see each others files when they click on the image icon in wysiwygPro, and the "Enable user-specific file management" setting is unchecked (can cannot be checked).

Hopefully this helps a little.

somebodysysop’s picture

I managed to figure out how to get the variable into the table by running this php code:

variable_set('wpro_file_management', TRUE);

to no effect. Users can still only upload images to a shared folder: wpro_shared.

somebodysysop’s picture

Version: 5.x-1.0 » 5.x-1.1

Downloaded 5.x-1.1. Had to make the following changes for PHP4:

function _wpro_check_path($dir) {
	$lastA = array();
	
	if(!is_dir($dir)) {		
		/*** mkdir() will work recursively for PHP5+ ***/
//		if(!mkdir($dir, 0775, TRUE)) {			
		/*** I use the PHP4 mkdir() command ***/
		if(!mkdir($dir, 0775)) {			
		/*** I put in this comment to ease user's minds when they see the warning ***/
        drupal_set_message('This directory is now being created : ' . $dir);			
			/*** for PHP4 recursively create folders ***/
			/*** I don't have PHP4 to test so I'm leaving this commented out ***/
			/*** I uncomment it for PHP4. ***/
			$fArray = explode('/', $dir);
			while($lastA[] = array_pop($fArray)) {
				if(is_dir( implode('/', $fArray) )) {
					foreach($lastA as $i) {
						$last = array_pop($lastA);
						if(mkdir( implode('/',$fArray) . '/' . $last )) {
							array_push($fArray, $last);
						}
					}
					break;
				}
			}
			return FALSE;
		} else {
			return TRUE;	
		}
	}	
	return TRUE;
}

A warning is thrown if the directory doesn't already exist, but it is created.

But, it is working. Thanks for your help!

One final question: Is there a way to NOT have the shared image directory created but just use the individual user image directory? I don't see how that can be done right now.

Thanks again.

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 220415)