Really struggling with some code here.

I have a site where I've created a custom role 'Agent' and an agent needs to be able to upload images via a frontend form.

I've managed to get the code working and it's fine but as soon as I've tried it on an SSL domain it doesn't seem to work. I mention about the SSL because I've got it working on two different domains without an SSL but it doesn't work on two domains with an SSL attached to it.

So I've started working on a simplified development version of the site, which is now on an SSL domain so I can get it working.

Now the frontend works as I mentioned on a domain without an SSL as an agent role. But breaks on with an SSL, I've managed to upload an image file with the frontend form as an administrator fine.

I'm really struggling here so if anyone has any idea what might be going on it would be really appreciated.

I should also mention that I used User Role Editor and gave the 'Agent' role every single capability to make sure that wasn't an issue.

Thank you.

  • Have you checked the console in your browser's developer tools? I suspect you'll find a javascript error. – user3437470 Apr 6 '18 at 12:06
  • Yeah checked the log and no error. Also, I've looked at the response from 'async-upload.php' and I've found that there is a 302 error but no response code there. – Kane Mitchell Apr 6 '18 at 13:30
  • Just tried something different. So the issue only seems to occur when I use my custom login page. If the 'Agent' logs in via wp-login.php page and goes to the upload page, the upload works fine. – Kane Mitchell Apr 6 '18 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.