Forum

Thread tagged as: Problem

Editor role unable to upload after Perch update

Hi there

As the subject describes, I upgraded to the latest version of Perch but have been told by my client that they can no longer upload any files. I can still do it as my role, but they are 'Editor' roles and since the upgrade, it no longer works for them. The update has introduced 'Assets' so is there anything I need to do to keep it running as normal? I have made sure there isn't a check box I need to tick in Users section but can't see anything.

Is there something new with Assets that I am missing?

Thanks in advance, Michael

Michael Wilkinson

Michael Wilkinson 6 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Note that the new privilege to enable uploading may need to be enabled for roles in some installations in order for those users to continue as before. Go to Users, Roles, choose the role and verify the Assets privileges you have set.

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Hi Drew

Thanks for the reply.

I can't see anything listed to do with Assets. Should it be a section on it's own? I have System, Pages, Blog and Gallery sections. I can't see anything obvious to do with Assets in those sections. Am I being blind?!

The admin user just has absolutely everything checked in all sections, but I still can't see anything to do with Assets for that user role.

I can provide a screen shot if that helps.

Thanks, Michael

Drew McLellan

Drew McLellan 2638 points
Perch Support

Did the update run when you installed Perch 2.5.3?

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Hi Drew

Some progress now. I had updated to 2.5.2 and there was no Assets section in the user roles page at all. I have now upgraded to 2.5.3 and the Assets section has now appeared. However...even though I ticked the Assets option, it still didn't work. It allowed me to select an asset but not upload a new one. So, I added a new editor user to see if it made a different and it does. I logged out, and back in as the existing editor and I couldn't do it again.

So...for new users it fixes the problem but for existing users, the new privileges do not work regardless of what is ticked.

I will have to remove the existing editors and re-add them which is a pain but I don't know what else I can do right now. It might be a wee bug with the update routine though so hopefully my playing around will help you solve it.

Thanks, Michael

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Drew

Sorry to be a pain, but I have just removed a user to re-add them again but it still doesn't work for that user. Does Perch retain info of a past user even though I have deleted them? If so, then this is more of a problem as I can't create new accounts for everyone along with their existing ones.

Thanks, Michael

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Me again!

Right, even more info. I changed the existing user to be an admin, saved it, logged in, checked they could upload, logged out, changed them back to an editor, logged in again and now they can do it.

So...a workaround is to upgrade all editors to an admin, save it, then change them back to an editor.

Sorry to waffle on so much but I'm hoping it's all useful info.

Thanks, Michael

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

I'm afraid it's still not working. I thought I had found a work around but it seems that something is still wrong and I have found another issue too.

I don't know why, but the user in question logged in and still said they couldn't upload anything. So I logged in as them as I had it working and hey presto, they were right. They can't add an asset, even though they could before and even though the privilege is ticked, they can't do it. I added a new user and they could add assets ok, but now, just one hour later, they can't.

Then something really weird happened. I logged back in as the primary admin, and I couldn't upload anything either! On a region where I select a file, the asset pane slides in from the right but I only had an option to 'use selected'. Then...and this is the weirdest bit of the lot...after about 10 minutes, it all started working again but just for my user!

Also, I have 5 resource buckets but it only lists one of them, so I can't upload to any of the other buckets. Before I upgrading and Assets came along, I had no problems at all.

I can't help but think something is very wrong somewhere. I almost can't believe what is happening but I have had someone else try it all too with the same result.

Is there anything I can do? My client needs get uploading pretty quickly. I really don't want to revert to a version pre-assets.

If there is any more info I can provide, I would be happy to.

Thanks, Michael

Drew McLellan

Drew McLellan 2638 points
Perch Support

This sounds very much like caching. Let me look into it.

Michael and Drew,

Just wanted to add that I am having the same problem since upgrading today to Perch 2.5.3.

Assets was working while I was on version 2.5.1, after upgrading to 2.5.3 (I missed version 2.5.2), I created a new region and when I went to add content, I couldn't upload images because the Add button was missing and I can't see any of my previously loaded assets either.

I did clear my cache, restart my browser and my server...and still no progress.

Ok, just an update.

I found that I can upload images if I go directly through the Assets App (the "Assets" link at the top of the page in admin), but still not through any Image fields in my regions.

The "Add Asset" button is in the Assets App, but does not appear through the "Select or upload an image" link of an Image field in my regions.

Also, when using an Image field to "Select or upload an image", no assets appear until I apply a filter, either "By Asset Type" or "By Bucket" and then clear the filters. Only then, do all my assets become visible and selectable. But still no "Add Asset" button available.

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Hi Drew

Is there any further info for this? My client was happily uploading some images earlier when all of a sudden, then 'Add Asset' button stopped showing. Coming out of the region and going back in brought it back again on one occasion but then it happened again and the only thing that brought it back was logging out, closing the browser and logging in again.

The other user who had an account prior to the upgrade has never had the 'Add Asset' button come back at all and I have deleted the user account and created a new one but still nothing! They are both Editors with all the correct tickboxes ticked.

Is there anything I can try? I'm getting a lot of grumblings about this. Happy to provide any info that you think may help.

Thank you.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show me the output of perch/core/inc/js_privs.php from your browser?

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Hi Drew

This is the output of the user that has never been able to upload anything:

Perch.Privs.init( ["perch.login","content.pages.edit","content.pages.reorder","content.pages.create", "content.pages.configure","content.navgroups.configure","content.pages.create.toplevel","content.pages.delete.own", "content.templates.configure","content.pages.attributes","assets.create"] );

Thanks..

**EDIT - This didn't wrap so have edited to read better but there were no spaces in the output...

Drew McLellan

Drew McLellan 2638 points
Perch Support

I can see assets.create in there, so that looks good.

Which browser? Which server OS?

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

Browser is Chrome, but when this problem started I asked them to try different browsers and Firefox and the dreaded IE was tried but to no avail. The staging server is a linux box running CentOS. This is a snippet output from the diagnostics page within Perch:

Perch: 2.5.3, PHP: 5.3.28, MySQL: mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.5.3), assets (2.5.3), perch_blog (4.1), perch_gallery (2.8.5), perch_twitter (3.2)

The same problem occurred on my development machine which is Windows 8 running XAMPP and tested with browers Chrome and Firefox.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you able to create me a Perch login on the system that's failing?

Michael Wilkinson

Michael Wilkinson 6 points
Registered Developer

I can do that no worries. Would it be better to give you the login details of the editor account that is failing or do you want a new account? If so, admin or editor?

Oh...and can I send the details to you privately, I'd best not let this out to the public as it's still in development with data being uploaded! If that's ok, is there an email address I can use?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Either the editor account, or an new account that is also failing. Thanks - hello@grabaperch.com