Hello,

I was hoping a could get some help with an issue that's preventing any functionality of the Web FM module. Details below:

Error Message on Web File Manager page:
getIconDir is not defined
[Break on this error] this.icondir = getIconDir();

All I'm seeing is the 'File Upload' fieldset and input field. I receive an error message when attempting an upload:
Webfm.dirListObj has no properties
[Break on this error] Webfm.dirListObj.refresh();

This occurs both on a 1and1 web server and localhost (Xampp, specifically):
Drupal: 5.1
MySQL database: 5.0.41
PHP: 5.2.2
Apache/2.2.4 (Win32)

Modules installed:
FCKeditor (latest dev)
JStools (latest)
Image (inc Import and Galleries)

Things I've tried so far:
Disabled all modules that may conflict
Experimented with various config settings for PHP, Apache, Web FM, folders, hairstyles, etc
Updated to dev version of Web FM

Please let me know if you need more information. I have followed all instructions in the readme to the letter (file directories, permissions, etc)

Thanks very much for any help in advance!

Regards,
Steve

Steve Burrows

Comments

robmilne’s picture

The upload fieldset will always show up as long as the php is running properly. This is the only part of the WebFM UI that isn't generated by js on the DOM (though the js hijacks the upload button to redirect the submit to a hidden iframe). I do see this phenomenon from time to time but usually only during the process of breaking things during development. I don't have a quick answer on hand for why your javascript isn't running. Some contrib modules don't play nicely together so you can experiment with disabling other modules. Since it sounds like you have already tried this I'm not sure what else to suggest other than to log onto the demo site and compare my settings with your own. I also assume that your db has built the two WebFM tables required.

steveb_uk’s picture

Title: Error Message: » Error Message

Hi Rob,

Thanks for your help (and for the great module!). After comparison with your set-up, I noticed that the 'inner javascript' was not being included in the head of the page. I manually entered the required script (

function getBaseUrl(){return "mysiteaddress..... etc

) and now everything is functioning perfectly.

This may not be the best place to ask this, but is there a way to enforce the 'collapsed => FALSE' setting for the 'File Meta Data' fieldset? I can't seem to find it within webfm.module. Knowing my client as I do, they won't want this to be collapsed.

Also, I was also going to enquire into the possibility of including the Web FM files in the main site search for all types of users (we will have 100's of PDFs containing scientific research). It would be great if this was even remotely possible for me to go off and development. I can create a new feature request for this if that's more appropriate

Thanks again,
Steve

robmilne’s picture

Here is a quick hack for the fieldset issue. It would be better to have this as a configurable option but this will give you what you need. Manually make these two changes your webfm.js file (dev):

At line 1778


/**
 * Webfm.meta constructor
 */
Webfm.meta = function(parent) {
  var elFset = Webfm.ce('fieldset');
  elFset.setAttribute('id', 'metadata');
  Webfm.collapseFSet(elFset, Webfm.js_msg["meta-title"], true);
  ...

At line 2490


/**
 * Maintain compatibility with collapse.js
 * Since webfm fieldsets are built directly on the DOM, collapse.js onload
 * event will not convert them automatically - we must invoke manually here
 */
Webfm.collapseFSet = function(parent, text, collapse) {
  parent.className = 'collapsible collapsed';
  var elLegend = Webfm.ce('legend');
  parent.appendChild(elLegend);
  var fieldset = parent;
  // Expand if there are errors inside
  if (($('input.error, textarea.error, select.error', fieldset).size() > 0) || collapse) {
    parent.className = 'collapsible';
  }
  ...

I don't have anything to offer wrt search. Drupal search has always been underwhelming and I wish someone would improve it so that it could index files and file contents. Currently it will only search node text content. At my previous workplace we adapted mnogo to drupal but the module wasn't kicked back to d.o.

steveb_uk’s picture

Thanks for your help, the fieldset is sorted now.

Regarding the searching, I'm now using a view to create a searchable directory of all the publications on the site, however it will only display those that have been attached to nodes. I have tried altering the webfm_views include but no luck so far.

Again, if this should be re-created as a separate issue, just let me know

Thanks for taking the time

robmilne’s picture

If I find time I will look at Andre's views interface and see if I can link my file search with it so that attachment won't be necessary. No promise since I have too many cares.

robmilne’s picture

Status: Active » Postponed
robmilne’s picture

Status: Postponed » Closed (fixed)