All pages getting 404 error

I am brand new to Drupal. So much so this is my first install. I have been working in wordpress for all my sites but I have a potential new client with a Drupal site. I figured it was time to become familiar.

I have setup my site http://drupal.shawnwright.net/ and things seem to go well. At the home page, when I click on any of the buttons, configuration, appearence, add content, etc, I get a 404 error.

Views_get_view in twig

In drupal 7 you could use "views_get_view('view-name', 'view-display-name') to render a view in the theme template.

Does anyone know the way in drupal 8 to render a view in the twig template?

(My case is very simple, 2 column user profile, right column is a view of viewed user content)

Admin toolbar disappeared after integrating html.html.twig in D8

I'm using a custom theme and when I integrated my own html.html.twig structure (based off the one from core), the admin toolbar disappeared and hovering over block/view elements no longer shows the configure/edit menu actions. The top toolbar is there when I access one of the admin pages on the back end, but when viewing the site itself, it's not there... even though I'm still logged in as admin. I've cleared the cache multiple times, but still no dice.

Do I need to render/output the display of the admin toolbar in my htm.html.twig file?

Drupal 8 anonymous permissions bug

I think I found a bug in Drupal 8.0.2 I created a site who's content should only be available via a drupal login. The anonymous user should only be able to access the login page.

So I created a content type called "front page" and gave the anonymous user access to it, and removed anonymous access to all other content types. The anonymous user only has "view published content" permission so it can see the front page content type

However, the anonymous user is still able to access some, but not all basic pages as well as other stuff.

How to get formatted node creation date in D8?

I tried:

{{ date|date("m/d/Y") }}
Throws:
Exception: DateTime::__construct(): Failed to parse time string (<span data-quickedit-field-id="node/1/created/en/full">Thu, 02/11/2016 - 22:11</span> ) at position 0 (<): Unexpected character in DateTime->__construct() (line 515 of XXX\vendor\twig\twig\lib\Twig\Extension\Core.php).

Content disapear after reloading

Hi !

I did a block who's displaying data from external database, it's working one time, but when i reload the page, the content disapear... It's like if my php is called only one time.

See the code :

class block_perso extends BlockBase {

public function build() {
$bdd=new \PDO('mysql:host=localhost;dbname=**','**','**');
$req = $bdd->prepare('SELECT * FROM **;');
$req->execute();
$resul = $req->fetchAll();
foreach($resul as $row)
{
echo (string)$row['name'] ;

}
}

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x