Hi,

During execution of Search Integration tests https://travis-ci.org/mkalkbrenner/search_api_integration_tests/jobs/171...
there are number of tests that has failed cause "404 page" was unexpectedly returned.

Sample output:

Pass      Browser    IntegrationTest.p  919 Drupal\search_api\Tests\Integration
    GET
    http://localhost:8888/admin/structure/types/manage/article/fields/node.article.field_link/delete
    returned 404 (607 bytes).
Pass      Other      IntegrationTest.p  920 Drupal\search_api\Tests\Integration
    "The listed configuration will be deleted." not found
Fail      Other      IntegrationTest.p  921 Drupal\search_api\Tests\Integration
    "Search index" found
Pass      Browser    IntegrationTest.p  923 Drupal\search_api\Tests\Integration
    Valid HTML found on
    "http://localhost:8888/admin/structure/types/manage/article/fields/node.article.field_link/delete"
Fail      Other      IntegrationTest.p  923 Drupal\search_api\Tests\Integration
    Found the Delete button
Fail      Other      IntegrationTest.p  923 Drupal\search_api\Tests\Integration
    Found the requested form fields at
Pass      Browser    IntegrationTest.p  924 Drupal\search_api\Tests\Integration
    GET
    http://localhost:8888/admin/structure/types/manage/article/fields/node.article.field_image/delete
    returned 404 (608 bytes).
Pass      Browser    IntegrationTest.p  925 Drupal\search_api\Tests\Integration
    Valid HTML found on
    "http://localhost:8888/admin/structure/types/manage/article/fields/node.article.field_image/delete"
Fail      Other      IntegrationTest.p  925 Drupal\search_api\Tests\Integration
    Found the Delete button
Fail      Other      IntegrationTest.p  925 Drupal\search_api\Tests\Integration
    Found the requested form fields at

However this is happening only within PHP built-in webserver.

All tests are passing successfully when executing the same tests with same environment but within NGINX host instead of PHP builtin webserver.

Any ideas?

Comments

itsekhmistro created an issue. See original summary.

niko-’s picture

itsekhmistro’s picture

Analyzed the issue.

It has been fixed in `drush rs` command:

// The built in webserver incorrectly sets $_SERVER['SCRIPT_NAME'] when URLs
// contain multiple dots (such as config entity IDs) in the path. Since this is
// a virtual resource, served by index.php set the script name explicitly.
// See https://github.com/drush-ops/drush/issues/2033 for more information.

The issue is caused exactly by this case - The built in webserver incorrectly sets $_SERVER['SCRIPT_NAME'] when URLs contain multiple dots - dots in config entity IDs in the path.

For integration tests it has been fixed in https://github.com/mkalkbrenner/search_api_integration_tests/pull/11/files

This issue can be closed.

itsekhmistro’s picture

Status: Active » Fixed

Fixed within search_api_integration tests and drush rs https://github.com/drush-ops/drush/pull/2420

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.