Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
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.
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?
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.
{{ 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).
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'] ;