Resource title change after upload. How to avoid? (plupload)

191 views
Skip to first unread message

Robert Keßeler

unread,
May 7, 2020, 10:35:40 AM5/7/20
to ResourceSpace
Hello,

I guess it is easy if you know where to look. I dont..
After uploading/changing the main image, the title of the resource changes to the filename.
We need to keep the title already set.
Which config option(s) do I have to change?
I have not found an answer with google and looking into upload_plupload.php

Thanks in advance
Robert

Robert Keßeler

unread,
May 11, 2020, 2:33:14 PM5/11/20
to ResourceSpace
Btw I am using version: 8.4.10956

I solved the problem by commenting out 3 lines in function upload_file in /include/image_processing.php

if(isset($newval)){update_field($ref,$read_from[$i]['ref'],$newval);}
update_field($ref,$filename_field,$filename);
update_field($ref,$filename_field,$original_filename);

Line numbers will vary, just search for them.

Hope it helps somebody

Matt Hogan

unread,
Jan 6, 2021, 5:31:10 PM1/6/21
to ResourceSpace
Hi Robert,

This is helpful. I've searched high and low too for something I thought would be common. But would you mind directing me to where exactly this modification is made? We generally want our uploaded files to retain original file title when in Resource Space. Currently we are manually doing this after upload!
Many thanks in advance
Matt

reidb...@gmail.com

unread,
Jan 7, 2021, 10:14:16 PM1/7/21
to ResourceSpace
You could also check the config.php setting: $view_title_field=8;

That controls which metadata field is shown as "the resource title" when viewing a single resource.

Matt Hogan

unread,
Jan 8, 2021, 5:06:12 AM1/8/21
to ResourceSpace
Ah, great. Will try that. 

Ideally I'm looking to see the original file name when viewing multiple resources in a collection, as per example below. The original jpg file name pre upload was more descriptive than the generic title we had to enter on Upload i.e. 'Gallery 5 ceiling void'. Would this be a different setting do you think?

Thanks again.

Screenshot 2021-01-08 100358.png

reidb...@gmail.com

unread,
Jan 9, 2021, 6:20:37 PM1/9/21
to ResourceSpace
Yes different setting. Look at the config $thumbs_display_fields and $xl_thumbs_display_fields
Those let you define which metadata fields are visible on the thumbnail views. There are also config for the small thumbs and list views.
-Reid

Matt Hogan

unread,
Jan 21, 2021, 1:12:39 PM1/21/21
to ResourceSpace
Sorry to sound needy - we're new here! Where exactly is this edited? I've searched System> Configuration and also System>Metadata fields.
Thanks again
Matt

reidb...@gmail.com

unread,
Jan 21, 2021, 9:46:16 PM1/21/21
to ResourceSpace
Those options you may need to edit directly on the web server in your "config.php" file. Refer to "config.default.php" to look at all of the possible configs and some good info on what they do and how to control them. Don't though edit that "config.default.php" file, add the configs and settings you want to your "config.php" file.

Matt Hogan

unread,
Feb 1, 2021, 11:24:14 AM2/1/21
to ResourceSpace
Thanks a lot! This worked, but may have exposed a coding bug or system restriction. After making those changes to the config file to show Original Filename in thumbnails, it only works if the Original Filename field within the metadata is edited to not contain an extension e.g. [Original file name].jpg or .pdf. Below examples show thumbnails where in one on the left side, the extension has been removed individually in the meta data and so allowing Original filename to display on the thumbnail. Next to this thumbnail is an example where Original Filename field is not edited, retaining the extension in the metadata, and hence Original filename does not show in the thumbnail.

Obviously most uploaded files have extensions so to edit every one would be extremely onerous. 

This is veering off the opening topic a little now, but have you come across this at all, Reid? I'll raise separately otherwise.

Thanks 

Matt 

Example 1:
Thumbs 1.jpg
Example 2:
  Thumbs 2.jpg


reidb...@gmail.com

unread,
Feb 1, 2021, 4:58:55 PM2/1/21
to ResourceSpace
I have not seen that. What version of RS are you on?

Matt Hogan

unread,
Feb 9, 2021, 5:55:41 AM2/9/21
to ResourceSpace
Thanks for reply. 

We're on SVN 9.4.

reidb...@gmail.com

unread,
Feb 9, 2021, 1:55:03 PM2/9/21
to ResourceSpace
Have you changed the filename metadata field at all from the native that is set with default RS? Is it field 51 with nothing set for IPTC or Exif extraction sources and shorthand name "originalfilename" with indexing on?

Matt Hogan

unread,
Feb 10, 2021, 7:40:34 AM2/10/21
to ResourceSpace
Hi

I was in touch with RS directly about this who advised: 

...if you have recently changed the thumb view values you would need to run:

https://[yoururl]/pages/tools/fix_resource_field_column.php?field=8

Based on whatever fields you have added, but one by one.

This did the trick!

Thanks again for your help Reid.




reidb...@gmail.com

unread,
Feb 10, 2021, 8:13:10 AM2/10/21
to ResourceSpace
Ah, right on. 👍
Reply all
Reply to author
Forward
0 new messages