Skip to main content

Questions tagged [bootstrapping]

Use it for questions about the operations done from Drupal to initialize itself, not about Twitter Bootstrap.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
60 views

drush updatedb fails to complete: Bootstrap fails at phase 5, can't find Drush config file

Trying to use drush updatedb after running core updates. Updatedb fails. Code snippet below. EDIT: Project: Website built by 3rd party firm and handed over to my department after the contract to ...
MJX's user avatar
  • 1
3 votes
1 answer
856 views

How can I bootstrap my site from an external script?

Community asked.. Please clarify your specific problem... Fair comment. What I'd like help with is how do I correct the script below so it works with D9. <?php use Drupal\Core\DrupalKernel; $...
peter300's user avatar
1 vote
1 answer
442 views

Programmatically log in a user

I am trying to authenticate users as below. I don't get any error, but it doesn't log in users. autoLogin.php is located in the root folder. Visiting http://example.com/drupal8/autoLogin.php shows me ...
likeachamp's user avatar
0 votes
0 answers
799 views

Drush can't bootstrap sites

I have an Ubuntu 18.04 server where I have one Drupal 8 and two Drupal 7 sites. I have installed drush 8.4.5 which works great for the Drupal 8 site but on the 7 ones it can't bootstrap. After some ...
Thomas Pappas's user avatar
0 votes
1 answer
55 views

Allow authorization via cookies

We are migrating from Drupal 7 to Drupal 8 and are currently at the last hurdle - relying on Drupal's session to authenticate for custom scripts. Previously we used to rely on drupal_bootstrap but now ...
kieran_delaney's user avatar
0 votes
0 answers
110 views

How do I bootstrap from my /app.php without `Page not found`

Introduction There are lots of bootstrapping questions and answers on how to bootstrap but I haven't found how to not get Page not found watchdog notices. Using these question and answers I came up ...
Clemens Tolboom's user avatar
0 votes
1 answer
199 views

Cannot get currentUser after custom Drupal boot

I have a /foo.php on the Drupal 8 root which programmatically boots Drupal: chdir('web'); $autoloader = require_once 'autoload.php'; $request = Request::createFromGlobals(); print_r($request->...
cherouvim's user avatar
  • 1,937
1 vote
1 answer
46 views

How to affect kernel request hostname when bootstrapping from custom PHP script

I'm bootstraping from a custom PHP script using: $autoloader = require_once 'web/autoload.php'; $request = Request::create('/'); // $_SERVER['SERVER_NAME'] = 'whatever'; // $request->server->...
cherouvim's user avatar
  • 1,937
2 votes
1 answer
417 views

How to bootstrap a custom script and retrieve the session object?

I'm writing a custom script that requires a proper Drupal 8 user session to work. This is the current version: <?php use Drupal\Core\DrupalKernel; use Symfony\Component\HttpFoundation\Request; $...
Koala Yeung's user avatar
3 votes
1 answer
119 views

What does the term 'Bootstrap' mean?

Referring to https://www.drupal.org/project/health_check I am confused as to what 'If Drupal fails to bootstrap' means. What is term 'bootstrap' referring to? Does it make a database call? From what ...
Donna Delour's user avatar
0 votes
1 answer
369 views

How can I bootstrap?

How can I bootstrap Drupal 8 from an external script? This an example script from the RabbitMQ Work Queues tutorial. require_once __DIR__ . '/vendor/autoload.php'; use PhpAmqpLib\Connection\...
johndevman's user avatar
-1 votes
1 answer
73 views

Drupal 8 - what is application bootstrapper or auto-loader

I was working on a module in Drupal 8, and came across this thread answering a question on class auto-loading for Doctrine annotations: https://stackoverflow.com/questions/14629137/jmsserializer-stand-...
r_honey's user avatar
  • 203
1 vote
1 answer
254 views

How can I bootstrap a multi-site instance?

It's possible to bootstrap Drupal 8 and create a new node using answer # 174474. define('DRUPAL_DIR', '/usr/share/nginx/html'); use Drupal\Core\DrupalKernel; use Symfony\Component\HttpFoundation\...
Ch4mb3rs's user avatar
1 vote
2 answers
844 views

"No Drupal site found" -- Windows and SQL Server

So I'm trying to upgrade our system from using Drush 6 to Drush 8, as that is the currently supported version of Drush that supports Drupal 7. I have managed to get drush working, however it does not ...
Arak Tai'Roth's user avatar
0 votes
1 answer
318 views

Breadcrumb per content type per role, bootstrap theme

I need to display a breadcrumb per content type and per role. What the best way to do it. I've tried a lot of module and none fit my needs. I tried overwritting breadcrumb in template.php as follow, ...
Aporie's user avatar
  • 365
1 vote
1 answer
162 views

Breadcrumb add content type data without any modules

How could I print content type like the breadcrumb, for example Home/Content type/Create
tamilselvancst's user avatar
0 votes
1 answer
2k views

How to get my custom 404/403 pages to work with Bootstrap? [closed]

I use this in my template.php for custom error pages: //custom 404 not found page $header = drupal_get_http_header("status"); if($header == "404 Not Found") { $vars['theme_hook_suggestions']...
user3108268's user avatar
3 votes
1 answer
120 views

Why does DRUPAL_BOOTSTRAP_PAGE_CACHE phase come before DRUPAL_BOOTSTRAP_DATABASE?

According to this article about drupal_bootstrap function, all parameters for drupal_bootstrap() run sequentially. And if we see the sequence, here first comes - DRUPAL_BOOTSTRAP_CONFIGURATION, second ...
Sugandh Khanna's user avatar
0 votes
1 answer
44 views

Is drupal bootstrap phases will be called for each page request or its only once on site load?

All drupal bootstrap phases will be called on each page load or only one time when site will load.
saianth's user avatar
1 vote
0 answers
102 views

How to boostrap Drush from within an update hook?

I have a drush command I am using to convert field_collection to multifield. /** * Convert Field Collection to Multifield. */ function mvpd_update_7018() { module_load_include('inc', 'multifield'...
Elijah Lynn's user avatar
1 vote
1 answer
213 views

Script exits on drupal_bootstrap_full when run from system cron

I have a script that imports data into custom entities created in a drupal 7 database. It needs to run daily so i've added it to my system crontab (running CentOS 6.7). The problem i am having is that ...
Lindsay Mickey's user avatar
2 votes
1 answer
2k views

How do I check the current user session?

In Drupal 7, I was able to use bootstrap.inc in an external PHP script, which was a custom set of pages that simply bootstrapped Drupal to check the user was logged in Drupal. The following code is a ...
tremor's user avatar
  • 133
0 votes
1 answer
243 views

pathauto_clean_string and accents from a bootstrap PHP file

I have a single PHP file which makes a bootstrap of Drupal 7. The code is below. When I try to use pathauto_clean_string in a spanish string with accents (á é ... , etc.) it deletes the character ...
Cesar's user avatar
  • 932
1 vote
1 answer
175 views

How to load aggregated styles / js in an 'external' script via DRUPAL_BOOTSTRAP_FULL?

I have an external script / php application that I now have to implement into a running D7 site. So far DRUPAL_BOOTSTRAP_FULL seems to do the job just fine – I can read the session, check the user etc....
tillinberlin's user avatar
  • 1,110
1 vote
1 answer
265 views

Is it possible to have an external script run index.php that bootstraps Drupal?

It seems like such a simple question, and I apologize for my Drupal ignorance, but I am unable to get our Drupal contractors to accomplish what seems to be a simple request. I need the below script ...
GDP's user avatar
  • 115
1 vote
2 answers
178 views

Drupal as a RestAPI

I have been using Drupal for a while to build medium to large CMS systems; love it. From time to time I have to build a RestAPI. Usually I use either Laravel, Lumen or Slim. The only reason why I ...
JP Dippenaar's user avatar
0 votes
1 answer
1k views

Change appearance of search form [closed]

I want to change the appearance of the Drupal 7 search form. I used this code in my preprocess-html.inc file for my Omega subtheme. It didn't work. How do I assign html classes to divs within the ...
user55305's user avatar
15 votes
5 answers
8k views

Bootstrap from external script

I am trying to create Drupal entity instances from an external script that is not part of Drupal or a Drupal module. For Drupal 7 there was drupal_bootstrap to load the required Drupal dependencies. ...
sleidig's user avatar
  • 543
-2 votes
1 answer
169 views

Is this way safe to bootstrap Drupal from an external PHP script? [duplicate]

I want to bootstrap Drupal from an external PHP file located in Drupal's root directory. The following code will do the job. error_reporting(E_ALL); ini_set("display_errors", 1); define('DRUPAL_ROOT',...
Shad81's user avatar
  • 74
1 vote
0 answers
25 views

How to fix this issue in drupal7 using windows [duplicate]

How to fix this issue ? Fatal error: require_once(): Failed opening required '/var/www/.../includes/sites/all/modules/entity/includes/entity.inc' (include_path='.:') in /var/www/.../includes/...
Ankit Kumar Rathore's user avatar
0 votes
0 answers
94 views

Moved Drupal site trying to load old directory

I've been building a Drupal site in a subdomain/directory called "new". I've now gone to move the site to the root, so it loads on www and the website will not load, instead giving the following error:...
Fourjays's user avatar
  • 125
2 votes
1 answer
923 views

Error: Class 'Drupal' not found in bootstrap.inc

Please tell me what I'm doing wrong. I'm unable to run drush, see error below: [~/public_html/d8]# drush -d status Bootstrap to phase 0. [0.01 sec, 1.86 MB] [bootstrap] ...
akeimou's user avatar
  • 23
1 vote
0 answers
110 views

Redirect After Creating a Node - bootstrap.inc

I wanted to create a node from a standalone php file bootstrapping drupal. I printed out the form and it creates a node perfectly but it doesn't redirect to the created page or any other page for that-...
Ibrahim's user avatar
  • 21
1 vote
1 answer
67 views

Database corrupted getting the site crash

I crashed my website trying to secure it by changing files and folders modifications...After i tried many things (chmod 777 -temporarly- all to take it back, clear the cache, drush rr...) nothing ...
Ryan's user avatar
  • 57
2 votes
4 answers
2k views

"Class 'PHPMailer' not found in /home/mysite/www/sites/all/modules/phpmailer/includes/phpmailer.class.inc on line 12" [closed]

I tried to work on my security parameters on drupal... I went into the security page on drupal and chmod 664 the following folders: themes, modules, cache, site, profiles and include. Simultaneously, ...
Ryan's user avatar
  • 57
1 vote
0 answers
35 views

Layering a view on top another

I'm wondering is it possible to have a bootstrap views tab and within that tab content(images) with bootstrap views grid layout, therefore each tab would have images in grid layout.
John's user avatar
  • 31
2 votes
1 answer
614 views

How to add margin between columns with Drupal Bootstrap View Grid [closed]

I need help I'm trying to add some margin between columns using drupal Views Bootstrap module the grid view but the columns are closed together. How can I add margin between columns. I have tried ...
John's user avatar
  • 31
2 votes
2 answers
357 views

Avoid drupal bootstrap for each image styles in private filesystem

Consider a scenario, where large number of images are attached to a node and they are displayed as thumbnail gallery when that node is displayed/rendered. The node has access control so it displayed ...
amit's user avatar
  • 444
1 vote
0 answers
1k views

Fatal error: require_once(): Failed opening required

I've seen other questions related to this require_once error but none seemed to have cleared the issue for me. I'm getting the error Fatal error: require_once(): Failed opening required '/var/www/...
A. Evans's user avatar
0 votes
2 answers
448 views

Where I can find examples of Drupal bootstrap levels?

I recently came through some Drupal apps that I needed to send some silent Ajax requests that performs a database update, and nothing else. Every such requests bootstraps Drupal to its full level ...
AKS's user avatar
  • 9,534
0 votes
1 answer
899 views

user_load() and EntityFieldQuery not found when running script via Drush

I'm trying to run a php script from the command line via Drush. When I tried to use EntityFieldQuery... $query = new EntityFieldQuery; I got the error: PHP Fatal error: Class 'EntityFieldQuery' ...
Kenny Wyland's user avatar
  • 3,058
-3 votes
2 answers
70 views

What are the implications of removing define('VERSION', '7.34'); from database.inc

I do not want to advertise what version of Drupal I am running. I want to remove the line: define('VERSION', '7.34'); What are the downsides to doing this other than the site not knowing it's own ...
Nigel Waters's user avatar
  • 1,024
2 votes
2 answers
2k views

Drush command needs higher bootstrap level - Pantheon Drush Alias Setup

I just setup pantheon for one of my websites. So far I've done the following and the site works fine: Version Drush: 5.3 Local Dev: Ubuntu 12.04 Git clone the repo to my local desktop Copy the ...
Patoshi パトシ's user avatar
0 votes
1 answer
2k views

better exposed filters and bootstrap 3. Problems with alignment [closed]

I have Drupal 7 and the BEF to filter a view. My site is running the Drupal Bootstrap framework V3. The regular 'basic' theming for the exposed filters works, but I would like to use checkboxes and ...
Even T's user avatar
  • 13
0 votes
1 answer
330 views

Drupal 7 completely offline, avoid Boostrap via CDN

I need to move my Drupal site to completely offline environment. The bootstrap library takes the correct Bootstrap JS and CSS from sites/all/libraries, but there is a CDN call to download Bootstrap ...
user1249791's user avatar
-2 votes
1 answer
86 views

embed boostrap into another theme [closed]

could someone answer this question for me please I will sound a bit simple, but if you'd had the past week, actually two weeks, that I've had with this client, you would understand.. so here is the ...
user1176783's user avatar
8 votes
3 answers
2k views

Site performance , cache not working properly

I am using the Performance Logging Module. Above screenshot, one strange thing I noticed that Insert Cache_bootstrap on every page. When you go to any page (both admin theme and frontend theme) Insert ...
Jalil Khan's user avatar
1 vote
1 answer
102 views

Cannot use my drupal installation after enabling new custom theme [duplicate]

I keep geting this error message on every page request: Fatal error: Allowed memory size of 167772160 bytes exhausted (tried to allocate 36 bytes) in C:\wamp\www\mydrupal2\includes\theme.inc on line ...
okey_on's user avatar
  • 261
0 votes
1 answer
621 views

Adding custom classes to Views Filters (view-filters) and Content (div.view-contents)

I'm using a theme that includes bootstrap. I'd like to inject class one_third into <div class="view-filters"> and two_third last to <div class="view-content">. Is there a way to do so from ...
Rick's user avatar
  • 2,984
0 votes
1 answer
732 views

During which bootstrap phase hook_exit & hook_boot will be invoked?

Project Documentation says.. Both are invoked even for cached page views. hook_boot says This hook is run at the beginning of the page request. It is typically used to set up global parameters ...
Anil Sagar's user avatar
  • 12.2k