Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 404 errors when visiting any page. #7

Open
vishalkhode1 opened this issue Jan 31, 2025 · 0 comments · May be fixed by #8
Open

The 404 errors when visiting any page. #7

vishalkhode1 opened this issue Jan 31, 2025 · 0 comments · May be fixed by #8
Assignees
Labels
bug Something isn't working

Comments

@vishalkhode1
Copy link
Contributor

Describe the bug
When deploying a code artifact on Acquia Cloud Site Factory, the following issues occur:

  • JS and CSS files are not generated, leading to 404 errors on all pages.
  • Pages such as /user and /user/login returns 404 (Page Not Found).
  • The plugin is overriding/removing the drupal-scaffold settings in composer.json, instead of only making necessary changes.

Root Cause
The issue arises because the .htaccess file under the project docroot directory is not being pushed when deploying the code artifact.
Without .htaccess, requests for static assets (JS, CSS, images) do not get routed correctly to index.php, causing 404 errors.

To Reproduce
Run the following commands to reproduce:

// Create a fresh new Drupal project.
$ composer create-project acquia/drupal-recommended-project acsf && cd acsf

// Download acquia/drs-acsf plugin.
$ composer require acquia/drs-acsf  

// Run all commands as recommended by acquia/drs-acsf plugin.
$ ./vendor/bin/drush drs:acsf:init:all 
$ ./vendor/bin/drush drs:acsf:init:drush
$ ./vendor/bin/drush validate:acsf 

// Commit all changes.
$ git add . && git commit -m "The initial source code committed."

// Use acli to push code artifact to Site Factory.
$ acli push:artifact

// Install site on Site Factory and navigate to home page and you should see js/css broken.

Expected behavior
Site pages should load without 404 errors.

@vishalkhode1 vishalkhode1 added the bug Something isn't working label Jan 31, 2025
@vishalkhode1 vishalkhode1 self-assigned this Jan 31, 2025
@vishalkhode1 vishalkhode1 linked a pull request Jan 31, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant