1

The login page has no styling, including no Powered by image. This is what displays beneath the site's title:

Unstyled Admin Login

When I try to login I receive:

Bad Request Unable to verify your data submission.

The site is one I moved from dev to production, from a local to remote server. I used checkit.php on the remote server and it passed. I know the paths to asset volumes are incorrect, so while public pages display properly, they do so without images, which is what I was trying to login to fix. CSS, JS, text pulled from the database--all work.

What could be wrong? Thank you in advance for any help.

[Edit]

Thank you for responding. This site is on a Namecheap Stellar Business shared hosting plan. It's an addon domain. The "web" directory is set as document root. The site's folder is above the public_html directory in the hosting account's root directory.

Yes, there are 404 errors in the console. The unfound files exist where they should, in the web/cpresources directory. The 404 paths don't include the "web" directory.

Because the web directory is set to root, won't resources in the web folder will be found even if the "web" directory doesn't show up paths? The web/index.php file is found without "web" being in the url. The site loads for visitors to the site.

2
  • View your JavaScript console and you'll probably see errors attempting to load the JavaScript CP resources. Also given that this is likely a hosting/devops issues, can you provide more information on how/where the site is hosted? Sep 2, 2019 at 18:47
  • Thank you @andrew.welch I've added more info to question. Sep 2, 2019 at 21:43

2 Answers 2

1

The contents of the "web" folder should be inside public_html, not public_html/web. The craft folder (or it's contents) can then go into private_html (or whatever you have as a private folder, if any). Just remember to point index.php to the right folder for it to load.

It should in practice work if you set the right flags in .htaccess or nginx config, but there might be some inherent bug or hardcoded paths/routes in Craft. Not sure what might be causing it other than cpresources not being in /public_html/

7
  • I explained badly. An addon domain at Namecheap is created above public_html. I have a different site in public_html. So everything Craft, maintaining its directory structure, is in that root-situated directory. I suspect I don't understand something basic or that I need to talk with Namecheap support. But please, I'm all for criticism or any hints. Sep 3, 2019 at 22:32
  • Oh, gotcha! Is the folder structure something like /customer/x/number/domain_com/public_html or is it /customer/x/number/domain_com/additional_domain_com/ sitting right next to the public_html folder?
    – Anders
    Sep 3, 2019 at 23:24
  • It's like your second example: home/stalmqlb/<site-name>/web/index.html Sep 4, 2019 at 1:09
  • home/stalmqlb is the root. The account's public_html is in there as a neighbour to the add-on domain <site-name>. The add-on has no public_html for itself. Sep 4, 2019 at 1:16
  • that path should end with index.php not index.html which is just a "please be patient" page Sep 4, 2019 at 1:19
1

What "solved" my problem was to set cpresources permissions to 777, which isn't a fix, clearly. Doing so made the dashboard available and I was able to alter asset volume paths, so the site now displays images. The rest of the solution is to be found in discussion with Namecheap support, I believe. Anyway, the solution thus far was found here:

Craft 3 admin panel only accessible when web/cpresources is exectuable for everyone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.