0
Not a bug

Cannot change Advanced properties Web link

wido.filerun 1 year ago updated 1 year ago 4

I am running Filerun on an Ubuntu 18.04 machine. When I share a file using Web link and I try to change any of the settings in de Advanced tab I get this error:


"Failed to update web link!"

It prevents me from setting an expiration date or download limit for the file. Any ideas how to solve this problem?

Under review

Please check the file "system/data/temp/mysql_errors.log" and let me know if you find anything in there.

It would be useful to know what MySQL server version you are running.

Thank you for your respons Vlad. I run MySQL on a different machine that runs Ubuntu 18.04 as well. MySQL version is 5.7 (Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using EditLine wrapper).

There is an error in the mysql_errors.log:

/?module=weblinks§ion=ajax&page=update (POST)
2019-06-10T23:24:38+02:00 - UPDATE `df_modules_weblinks` SET `date_modified`=NOW(),`password`=NULL,`expiry`='2019-06-14 00:00:00',`download_limit`=NULL,`allow_uploads`=0,`allow_downloads`='1',`show_comments`=0,`show_comments_names`=0,`require_login`=0,`force_save`='1',`notify`=0,`download_terms`=NULL WHERE (id = '14')
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'require_login' in 'field list'

I am not sure why this column is missing. Do you have a suggestion how to repair the mysql structure?

Not a bug

That is the following SQL creating the particular table:

CREATE TABLE IF NOT EXISTS `df_modules_weblinks` (
  `id` INT(10) NOT NULL AUTO_INCREMENT,
  `id_rnd` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
  `uid` mediumint(9) NOT NULL,
  `pathid` INT(10) NULL DEFAULT NULL,
  `cid` INT(11) NULL DEFAULT NULL,
  `share_id` mediumint(9) NULL DEFAULT NULL,
  `short_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_created` DATETIME NULL DEFAULT NULL,
  `date_modified` DATETIME NULL,
  `expiry` datetime DEFAULT NULL,
  `download_limit` mediumint(6) DEFAULT NULL,
  `allow_uploads` int(1) NOT NULL DEFAULT '0',
  `allow_downloads` int(1) NOT NULL DEFAULT  '1',
  `force_save` tinyint(1) DEFAULT '0',
  `system` smallint(1) NOT NULL DEFAULT '0',
  `notify` mediumint(1) NOT NULL DEFAULT '0',
  `download_terms` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `show_comments` tinyint(1) NOT NULL DEFAULT '0',
  `show_comments_names` tinyint(1) NOT NULL DEFAULT '0',
  `require_login` TINYINT(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_rnd` (`id_rnd`),
  KEY `uid` (`uid`,`pathid`),
  INDEX (`expiry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

Thank you very much, Vlad. I dropped the table and used your query to recreate it. The advanced options for web links are available again.