Install Drupal 8 without mod_rewrite (or equivalent) enabled. The following error appears in the logs. This may be caused by code using contextual.module, but the error is generated here.

Response:

Error
The website has encountered an error. Please try again later. 

The error log shows:

Symfony\Component\HttpKernel\Exception\BadRequestHttpException: No contextual ids specified. in Drupal\contextual\ContextualController->render() (line 38 of /var/www/drupal8/core/modules/contextual/src/ContextualController.php).

OP's original issue
I have installed D8 B1 on a mac and can't send emails within Drupal. Emails sent from a simple php script work fine. Sorry but I have no idea what component this should be assigned to but I'm sure someone with more understanding will correct it.

Comments

drbeaker’s picture

Issue summary: View changes
mtift’s picture

Component: configuration system » mail system

I believe this should be mail system

13rac1’s picture

I get this error during installation (it shouldn't be sending mail there?) and when I directly access /contextual/render.

13rac1’s picture

Title: No contextual ids specified sending emails » No contextual ids specified. in Drupal\contextual\ContextualController->render()
Version: 8.0.0-beta1 » 8.0.x-dev
Component: mail system » contextual.module
Issue summary: View changes

See issue summary. Sorry about the minor hijack, if this can be generated with the mail system please provide code to reproduce.

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

when I directly access /contextual/render.

In that case, it's normal, since you indeed did not specify any contextual IDs. A simple HTTP GET request to that route does not make any sense, just like it doesn't make any sense for /system/ajax either.

I can't reproduce this. Please provide exact steps to reproduce.

13rac1’s picture

Status: Postponed (maintainer needs more info) » Active

Ah ha!

I figured out the cause. I'm on a fresh Linux install and I forgot to enable mod_rewrite. Drupal is supposed to install/work without mod_rewrite. It's completely unusable w/o mod_rewrite right now. One issue is this install error.

Detailed steps to reproduce:

  1. Get the current Drupal 8.0.x dev.
    $ git checkout b61edd72e7
    HEAD is now at b61edd7... Issue #2174589 by Wim Leers, ikeigenwijs, el7cosmos, setvik, YesCT: Split up ckeditor.admin.js
    
  2. Disable mod_rewrite
  3. Load: http://example.local/core/install.php in your browser.
  4. Install Drupal 8. (Standard/default settings with MySQL)
  5. Load: http://example.local/admin/reports/dblog in your browser.
  6. The most recent message will be the above error, probably at: /admin/reports/dblog/event/25.
wim leers’s picture

Status: Active » Closed (duplicate)

You're right, Drupal 8 requires clean URLs.

Hence this is a duplicate of #2094985: Drupal 8 install does not warn if Clean Urls are not supported. There's nothing to fix here.

13rac1’s picture

Title: No contextual ids specified. in Drupal\contextual\ContextualController->render() » No contextual ids specified during installation w/o mod_rewrite
Status: Closed (duplicate) » Active
Related issues: +#2099311: User login not working if mod_rewrite is not enabled

I'm sorry, but this is a valid issue. The point of #2094985: Drupal 8 install does not warn if Clean Urls are not supported is that Drupal 8 does not require clean URLs. #2099311: User login not working if mod_rewrite is not enabled is related, but a separate issue.

13rac1’s picture

Issue summary: View changes
wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

Oh, ok, I didn't realize that was the case.

Can you please copy/paste the exact HTTP request headers + body to /contextual/render? You can see them if you use Google Chrome, open the developer tools, and go to any page where you should see contextual links. Go to the developer tools' "Network" tab, click on the "XHR" subtab, and click on the row that shows the request to /contextual/render. There's the information I need.

13rac1’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Disable mod_rewrite (or equivalent) and install Drupal to reproduce.

Request Headers:

POST /contextual/render HTTP/1.1
Host: d8.local
Connection: keep-alive
Content-Length: 478
Pragma: no-cache
Cache-Control: no-cache
Accept: application/json, text/javascript, */*; q=0.01
Origin: http://d8.local
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/38.0.2125.111 Chrome/38.0.2125.111 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://d8.local/
Accept-Encoding: gzip,deflate
Accept-Language: en-US,en;q=0.8
Cookie: SESS7a0e57ed5e4b2c654fdca0e251719ffb=EUot_1v7FVoncwwO0kvg54fclO31xt-LX0xlAcqaMwk

Response Headers:

HTTP/1.1 400 Bad Request
Date: Wed, 26 Nov 2014 21:40:13 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.5
Cache-Control: must-revalidate, no-cache, post-check=0, pre-check=0, private
X-UA-Compatible: IE=edge,chrome=1
Content-language: en
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: application/json

Response:

{}

Copy as cURL:

curl 'http://d8.local/contextual/render' -H 'Pragma: no-cache' -H 'Origin: http://d8.local' -H 'Accept-Encoding: gzip,deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/38.0.2125.111 Chrome/38.0.2125.111 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: SESS7a0e57ed5e4b2c654fdca0e251719ffb=EUot_1v7FVoncwwO0kvg54fclO31xt-LX0xlAcqaMwk' -H 'Connection: keep-alive' -H 'Referer: http://d8.local/' --data 'ids%5B%5D=block%3Ablock%3Dbartik_account_menu%3A%7Cmenu%3Amenu%3Daccount%3A&ids%5B%5D=block%3Ablock%3Dbartik_main_menu%3A%7Cmenu%3Amenu%3Dmain%3A&ids%5B%5D=entity.view.edit_form%3Aview%3Dfrontpage%3Alocation%3Dpage%26name%3Dfrontpage%26display_id%3Dpage_1&ids%5B%5D=block%3Ablock%3Dbartik_search%3A&ids%5B%5D=block%3Ablock%3Dbartik_tools%3A%7Cmenu%3Amenu%3Dtools%3A&ids%5B%5D=block%3Ablock%3Dbartik_footer%3A%7Cmenu%3Amenu%3Dfooter%3A&ids%5B%5D=block%3Ablock%3Dbartik_powered%3A' --compressed

This is definitely caused by #2099311: User login not working if mod_rewrite is not enabled since forms submissions are broken without mod_rewrite. I'm closing since it's effectively a duplicate. Will re-open if the form submission fix doesn't correct this specific issue.