Editors can't upload files via EditPlus


(Evan Wills) #1

Squiz Matrix v5.2.7.5

For two out of three of our sites, users can no longer upload files via Edit plus. But it seems to be working fine for everything else. All sites use the same parse file. Edit plus config has not changed for any of the sites.

NOTE: We recently (1st June 2017) set up and implemented a single new design parse file for all our sites. Not long after this, editors began reporting the problem. I’m not convinced that the problem is related but it might be.

Any help would be much appreciated.


(Bart Banda) #2

Can you share a bit more info on what doesn’t work? As in, are there any errors (console in the browser or in the matrix logs)? What part/step fails and how? Any other differences you can find between the sites that you can share?


(Serge) #3

A screenshot of Chrome developer Tools on the Network Tab showing the failed upload request would be useful. Also the code from that new design parse file & nested elements.


(Evan Wills) #4

Here’s a screen shot. (Sorry for not including enough info in the original post)

Issues creating file asset(s)

  • A file with the same name may already exist under the selected parent.
    
  • Another user might be currently editing the asset you have selected as a parent.
    
  • Administrators may have imposed file extension restrictions for the file type.
    
  • You may not have write permission to the parent asset.
    

I checked the location of where I was uploading the PDF and there’s no other file with a similar name
Also, when I tried uploading same file via the _admin interface (using the same user account), the file uploaded without issue. So none of the points listed in the screen shot apply.

To me it looks like everything is behaving as it’s supposed to. But there’s problem is with a Matrix or Edit+ configuration item.

PS: When I looked at the console (in both Chrome and FF) there were no errors.


(Evan Wills) #5

Hi Serge

I’ve attached the parse file and the EasyEdit config js file.
As you will see from the parse file, it’s probably not a good idea to upload all the nested elements.

What’s most odd to me is that everything is fine on our library.acu.edu.au site but the www.acu.edu.au, www.acu.edu.au/staff & www.acu.edu.au/courses sites have the Edit+ upload problem. All four sites use the same parse file and same EasyEditConfig.js file. All sites also share the same base customisation of the public site inside parse file.

ACU2017 - public - inside (Id: #1198642) (62.9 KB)
http://www.acu.edu.au/_media/ees_config_files/EasyEditConfig.js


(Bart Banda) #6

Do you have any triggers that might be running on these sites that might be causing issues with it?

Also, is there anything in the Matrix error logs after the upload fails?

Also, is the location where you are trying to upload the files to linked anywhere else? Like the trash?


(Evan Wills) #7

Hi Bart

I looked through the triggers and couldn’t see one that might be causing an issue. (I also disabled a number that weren’t being used)

Linking: The parent assets are definitely not linked to the trash but many areas of the site are linked in multiple places (although the parent asset I was uploading to today only had one “TYPE 1” parent (grand parent was the site root).

As for the logs: Below is what I could see from my attempt today (as a super admin).
Note: The logs below are from System logs. I couldn’t find anything in any of the other logs.

From what I could understand of the logs, it looks like Matrix is successfully uploading the file but for some reason it never makes it into the asset map.

[2017-09-08 10:10:13][4599:Evan Wills][1024:matrix notice][ ] [asset - assetid:1331216;] (Asset Created) - New pdf_file "Pdf File #1331216" created
[2017-09-08 10:10:13][4599:Evan Wills][1024:matrix notice][ ] [asset.permissions.grant - assetid:1331216;] (Asset Permission Set) - Read permission has been denied on asset "Pdf File #1331216" for "Student Guest"
[2017-09-08 10:10:13][4599:Evan Wills][1024:matrix notice][ ] [asset.permissions.grant - assetid:1331216;] (Asset Permission Set) - Read permission has been denied on asset "Pdf File #1331216" for "Public User"
[2017-09-08 10:10:13][4599:Evan Wills][1024:matrix notice][ ] [asset.permissions.grant - assetid:1331216;] (Asset Permission Set) - Admin permission has been denied on asset "Pdf File #1331216" for "MER Internal Communications"
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.linking.create - majorid:301435;minorid:1331216;linkid:1979594;] (Asset Link Created) - "Pdf File #1331216" was successfully linked to "Tools & services"
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.lookups.updated - assetid:1331216;] (Asset Lookups Updated) - Asset "Pdf File #1331216" has successfully updated its lookups
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [purge.squid.cache - ] (Purge Squid Cache) - /usr/bin/squidclient -s -h 192.148.223.248 -p 80  -m PURGE http://www.acu.edu.au/staff/tools_and_services/Melbourne_2015-Web-directions_itinerary.pdf
Repopulate Cache: No, Cascade: Yes
Status: 0
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [purge.squid.cache - ] (Purge Squid Cache) - /usr/bin/squidclient -s -h 192.148.223.248 -p 80  -m PURGE https://www.acu.edu.au/staff/tools_and_services/Melbourne_2015-Web-directions_itinerary.pdf
Repopulate Cache: No, Cascade: Yes
Status: 0
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [trigger.success - assetid:17:16;] (Trigger Execution Success) - SUCCESS
Trigger "Clear Cache for file assets" (#16), Event: "trigger_event_asset_updated" broadcast by Asset: "Melbourne_2015-Web-directions_itinerary.pdf" (#1331216))
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.attributes.fulllog.scalar - assetid:1331216;] (Asset Attribute Changed) - The value of attribute "name" for asset "Pdf File #1331216" has been changed from "" to "Melbourne_2015-Web-directions_itinerary.pdf"
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.attributes.scalar - assetid:1331216;] (Asset Attribute Changed) - The value of attribute "name" for asset "Pdf File #1331216" has been changed from "" to "Melbourne_2015-Web-directions_..."
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.attributes.fulllog.scalar - assetid:1331216;] (Asset Attribute Changed) - The value of attribute "allow_unrestricted" for asset "Pdf File #1331216" has been changed from "1" to "1"
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.attributes.scalar - assetid:1331216;] (Asset Attribute Changed) - The value of attribute "allow_unrestricted" for asset "Pdf File #1331216" has been changed from "1" to ""
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.attributes.fulllog.scalar - assetid:1331216;] (Asset Attribute Changed) - The value of attribute "title" for asset "Pdf File #1331216" has been changed from "" to "Melbourne_2015-Web-directions_itinerary.pdf"
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.attributes.scalar - assetid:1331216;] (Asset Attribute Changed) - The value of attribute "title" for asset "Pdf File #1331216" has been changed from "" to "Melbourne_2015-Web-directions_..."
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.metadata.schema.set.fulllog - assetid:1331216;] (Asset Metadata Schema Applied) - The metadata schema "Pages - General" was applied to asset "Pdf File #1331216"
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.metadata.schema.set.fulllog - assetid:1331216;] (Asset Metadata Schema Applied) - The metadata schema "Staff - tracking & Analytics" was applied to asset "Pdf File #1331216"
[2017-09-08 10:10:16][4599:Evan Wills][1024:matrix notice][ ] [asset.metadata.schema.set.fulllog - assetid:1331216;] (Asset Metadata Schema Applied) - The metadata schema "design and promotion" was applied to asset "Pdf File #1331216"
[2017-09-08 10:10:19][4599:Evan Wills][1024:matrix notice][ ] [purge.squid.cache - ] (Purge Squid Cache) - /usr/bin/squidclient -s -h 192.148.223.248 -p 80  -m PURGE http://www.acu.edu.au/staff/tools_and_services/Melbourne_2015-Web-directions_itinerary.pdf
Repopulate Cache: No, Cascade: Yes
Status: 0
[2017-09-08 10:10:19][4599:Evan Wills][1024:matrix notice][ ] [purge.squid.cache - ] (Purge Squid Cache) - /usr/bin/squidclient -s -h 192.148.223.248 -p 80  -m PURGE https://www.acu.edu.au/staff/tools_and_services/Melbourne_2015-Web-directions_itinerary.pdf
Repopulate Cache: No, Cascade: Yes
Status: 0
[2017-09-08 10:10:19][4599:Evan Wills][1024:matrix notice][ ] [trigger.success - assetid:17:16;] (Trigger Execution Success) - SUCCESS
Trigger "Clear Cache for file assets" (#16), Event: "trigger_event_asset_updated" broadcast by Asset: "Melbourne_2015-Web-directions_itinerary.pdf" (#1331216))
[2017-09-08 10:10:24][4599:Evan Wills][1024:matrix notice][ ] [asset.linking.create - majorid:10;minorid:1331216;linkid:1979595;] (Asset Link Created) - "Melbourne_2015-Web-directions_itinerary.pdf" was successfully linked to "Trash"
[2017-09-08 10:10:27][4599:Evan Wills][1024:matrix notice][ ] [asset.linking.delete - majorid:301435;minorid:1331216;linkid:1979594;] (Asset Link Deleted) - "Melbourne_2015-Web-directions_itinerary.pdf" was successfully unlinked from "Tools & services"
[2017-09-08 10:10:27][4599:Evan Wills][1024:matrix notice][ ] [asset.lookups.updated - assetid:1331216;] (Asset Lookups Updated) - Asset "Melbourne_2015-Web-directions_itinerary.pdf" has successfully updated its lookups

(Bart Banda) #8

Hmm, I’m a bit lost then. Maybe it’s due to the version and something specific in your set up that’s causing it, but super weird that it works on other sites.
I think the next step would be to send a support ticket in to Squiz to see if they can have a closer look at your system to try and debug further.


(Serge) #9

@evanwills @Bart

Hi Evan / Bart,

From a programming perspective, (as I used to be a PHP developer), I’d say that there is an error here that isn’t being managed properly. I’ve seen things like this before:

$error_code = process_uploaded_file($my_uploaded_file);
if($error_code > 0) {
    throw new Exception("An error has occurred, it could be this, or it could be that, or maybe that");
}

That is just lazy programming. The exact error in the processing of an uploaded file should be spit out. I can guarantee that this is provided to the programmer at the time of the error itself, it’s a simple matter of doing proper error management with a switch statement or other known error handling techniques.

@evanwills use the Chrome developer tool, look at the network requests (raw http requests and response) of:

  1. Upload via _admin interface
  2. Upload via _edit

If one succeed and the other fails, they MUST send different attributes / data, either in the headers or in the payload.


(Evan Wills) #10

Hi Serger

A couple of weeks after I first posted this topic I had to make more changes to the parse file. The reparse process completed without issue (unlike earlier when the reparse process timed out) and the problem went away.

The fact it worked in _admin but not in edit+ must have been related to customisations being at least partially broken by the incomplete reparse. But this is just a guess. (Both Squiz Labs and I came to the same conclusion separately.)


(Serge) #11

Makes sense :slight_smile:

I still think the error that is spat out should be descriptive of the exact issue occurring.