Boa noite galera,
Após instalar o Drupal 8 em minha mais nova "impeleita", apareceu-me a seguinte mensagem:
"Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it"
A partir daí foi um inferno a busca por uma solução, porém encontrei. Primeiramente inserimos essas linhas no arquivo .htaccess (encontra-se no diretório raiz da instalação do Drupal):
# Serve Drupal 8 from sub directory in web root
RewriteRule ^$ drupal/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/drupal%{REQUEST_URI} -f
RewriteRule .* drupal/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* drupal/index.php?q=$0 [QSA]
Em seguida vamos navegar até o arquivo settings.php, que você poderá encontrar ele em: /seusite/sites/default/settings.php: modificando as seguintes linhas:
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Routing\LocalRedirectResponse;
use Drupal\Core\Routing\RequestContext;
Por:
use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Routing\
TrustedRedirectResponse
; use Drupal\Core\Routing\RequestContext;
E a linha:
// considers only redirects to within the same site as safe.
$safe_response = LocalRedirectResponse::createFromRedirectResponse($response);
Por:
// considers only redirects to within the same site as safe. $safe_response =
TrustedRedirectResponse
::createFromRedirectResponse($response);
Pronto, depois disso é só upar via ftp o arquivo e partir pro abraço.
Vlw flws.
0 comentários:
Postar um comentário