10

Pantheon's variant of Drupal is openly hosted on GitHub: https://github.com/pantheon-systems/drops-7 The main variation that matters is in drupal_settings_initialize(): https://github.com/pantheon-systems/drops-7/blob/master/includes/bootstrap.inc#L720 This is how Pantheon runs sites without making users handle DB or Redis credentials. This change is now ...


8

(Anyonymous) Page cache can not be controlled by max-age or contexts. You need to call \Drupal::service('page_cache_kill_switch')->trigger(); to prevent that kind of caching. However, if it is a block that is displayed on all pages, then that becomes pretty pointless to even try and you could uninstall the page_cache module completely.


5

When u install drupal u need to copy example.settings.php into settings.php, after drupal installation u need to include following code in settings.php: if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.local.php')) { include DRUPAL_ROOT . '/' . conf_path() . '/settings.local.php'; }


5

Start off by installing Terminus. Terminus now supports machine tokens; once you set these, up you can authenticate automatically without a password simply by running terminus auth login <email address>. Once you are authenticated with Terminus, terminus sites aliases will download Drush aliases for all of your Pantheon sites. Since this list can ...


4

Make sure you've properly configured Temporary Directory inside Admin => Configuration => Media => File System, and check if "Public File System" and "Temporary Directory" have valid permissions to them. Once confirmed, clear site cache. If not required you can also disable CSS Compression by navigating to "Admin => Configuration => Performance". So they ...


4

I'm not sure what you mean by moving something off of your local, but I really think your best bet is to use git and push the patch up, even if you don't have a local environment set up. You don't need a local server or database running, you're just altering code in the repo. clone Pantheon dev environment locally patch -p1 < name_of.patch commit and ...


3

Ok so this is how i solved it after 4 days of trying... the docs and support techs on pantheon are not clear which has lead to this confusion and im sure many others too. To get Drush aliases to work you have to have a settings.php file in the sites/default folder. BUT! when we use pantheon, we all git clone the codebase to our local. So we all assume that ...


3

While sites on Pantheon don't require a settings.php file in order to serve web requests, due to the fact that database credentials are dynamically injected, they will still need a settings.php configuration file present in order to enable the remote execution of Drush commands. With Drush 5 installed locally, there is unexpected behavior with Pantheon ...


3

You'll want to get the developers to add you to the team for the site project. Pantheon has its own dashboard: https://dashboard.getpantheon.com/ From this dashboard, you can use the "workflow" tools to sync the database and then do your work. That's the first step. Hope that helps!


2

While it's technically possible to use Drupal contrib to perform the redirect, it's faster and more efficient to redirect without having to fully bootstrap your web application. For web only actions, like redirects, check for the existence of $_SERVER['PANTHEON_ENVIRONMENT'] - if it exists, it will contain a string with the current environment (dev, test or ...


2

I had an error showing that: Migration failed with source plugin exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DESTINATION_database_name.migrate_map_migrationname' doesn't exist, in /code/includes/database/database.inc:2171 even though I have checked the database and the table is there... Was hitting my head against the wall for ...


2

legacy_database_name.migrate_map_tdmchanneltermparent is a table typically made by the Migrate module to perform a mapping between source DB data and destination DB data. There is typically migrate_map table(s) and for instance migrate_messages table(s). Be sure to properly Import or Rollback migrations. If you clearing the database by hand and dropping any ...


2

You should update the HybridAuth library to the latest version


2

Because Pantheon servers use Nginx, and they don't enable .htaccess support. You should contact them directly to discuss your options (if you're lucky and/or have a high enough subscription they'll probably add some custom rules to the nginx conf for you).


2

Drupal removes "write" permission from settings.php, so to edit it, you need to give this permission back. SSH chmod u+w sites/default/settings.php FTP, SFTP and alike Use your cilent, and just tick appropriate checkbox. Like this:


2

You can use sql-cli command for that: drush @alias.dev sql-cli < custom_sanitize.sql


2

Drush relies on information written by the Drupal.org package manager to determine whether or not updates are needed to modules or core. If you use git to install Drupal modules, then you may also use the git-deploy module, and it will add the information needed for Drush to do the update. Git deploy also works for modules installed via Composer using git; ...


2

If you are using Composer, why do you even need to use Drush to check for updates? You can just run composer update and it will automatically pull updates in. (This is not the definitive answer, but it occurs to me I could take this approach since I only update modules from my local dev machine anyway.)


2

If you already have terminus installed, you can use terminus drush instead of your local drush. The advantage of terminus drush is that it already has everything you need to work with Pantheon. The disadvantage is that you will have to do some work to set it up with your local dev environment; for that, I would just use your local drush. So, the workflow ...


1

That's because the $redirect_location doesn't get updated for https://example.com. See updated code below. $domain = 'www.example.com'; if(isset($_SERVER['PANTHEON_ENVIRONMENT']) && $_SERVER['PANTHEON_ENVIRONMENT'] == 'live') { $location = ''; if(in_array($_SERVER['REQUEST_URI'], array('/node/524'))) { if (isset($_SERVER['HTTPS']) && $_SERVER['...


1

Turns out a solution based on nikic/fast-route is quite simple. The actual code is about 30 LoC (not counting the redirections rules themselves): $redirects = [ 'something/{anything:.*}' => 'something-else/{anything}', 'another/one/{anything:.*}' => 'something/else/{anything}', ] doDedirects($redirects); function doDedirects($redirects) { // ...


1

If you have a reverse proxy service/server sitting in front of your Pantheon instance, it seems like that's the place to place your redirect rules. Rewriting/redirection is a common feature of reverse proxies. For example, CloudFlare supports redirect patterns under its Page Rules manager. Pantheon has a few doc pages that bring up using CloudFlare so it ...


1

Pantheon's terminus can skip drush, and pipe SQL directly into a "mysql connection command" echo 'UPDATE users SET pass="12345"' | `terminus connection:info mysite.dev --field=mysql_command` (source)


1

You could use the db_sanitization Quicksilver example, and sanitize automatically every time you pulled the database into your dev environment. If that doesn't work for you, open a ticket with Pantheon, and I will look at it on Monday (if someone else doesn't help you sooner than that).


1

This one was more obvious than I thought. Client added bogus domains to the dev environment which caused the uli to go to the wrong site.


1

Here is the preliminary solution I came up with myself. Pull requests and issue submissions welcome. See https://github.com/uberhacker/pantheon-backup.


1

I just ran into this issue. In your Twitter App settings, make sure you specify the Callback URL. Should be http://YOUR_URL/hybridauth/endpoint


1

This is how I solved it, I removed the OAuthException class from the OAuth.php file which can be found in sites/all/libraries/hybridauth/hybridauth/Hybrid/thirdparty/OAuth/OAuth.php and twitter login started working.


1

Create a field with machine name 'views_entity_commerce_order' in the pantheon one and then import your view.


1

Pushing a database from test to live is considered bad practice, which is why this is not a built in function on Pantheon. Generally speaking, once a site is up: 1. code should go from dev -> test -> live 2. database should go from live -> test -> dev 3. Configuration changes should be placed into code where possible. Features and Strongarm work well to ...


Only top voted, non community-wiki answers of a minimum length are eligible