Feed aggregator

Drupal Watchdog: Test Now! - Travis Integration for your Drupal Modules

Drupal News - December 9, 2014 - 9:46am

Travis-CI is a free-for-OSS continuous integration server, which has become very popular in the PHP world. Drush, Symfony, and dreditor all use it for frequently testing their code base and pull requests for regressions and ensuring new functionality has the needed test coverage.

Compared to the current Drupal testbot, Travis-CI allows testing of not only simpletest on PHP 5.3 (for Drupal 7 projects), but of most everything that you can install on a Debian system, e.g. QUnit for JavaScript, Behat, PHPUnit, but also Ruby based projects, Bash projects, Go projects, etc.

You can also test various scenarios in a matrix like setup, e.g. different PHP versions to ensure your code runs on both PHP 5.3 and 5.4 or with different versions of a dependent library.

This flexibility comes with a price however, because you need to setup the whole environment yourself. The selected PHP version (with xdebug) and composer are pre-installed, but that's it. The Drupal base installation, the running of the tests, the parsing of the test output, and ensuring dependencies are there is all your own responsibility.

And because of that there are many different .travis.yml files floating around the net for various scenarios of setting up this or that, but in the end everyone re-invents the wheel. Until now…

As Easy as it Gets

I am proud to announce the drupal_ti project, which allows any module on drupal.org to easily leverage travis-ci.org for testing:

  • PHPUnit
  • SimpleTest
  • Behat

The process (which I will show in more detail below) is as simple as copying a generic .travis.yml.dist file as .travis.yml to your modules root, push your repository to Github, activate the repository at travis-ci.org and you are done.

Oh, and while you are at it, if you add a .coveralls.yml file, then code coverage is automatically reported to coveralls.io, too (for PHPUnit).

All the hard work of installing drupal, running a web server, setting up Selenium, etc. is done by drupal_ti.

So you don't have to copy some .travis.yml you found on the net and spend hours debugging little edge cases (HHVM and sendmail, how to parse the simpletest output, etc.), but can depend on a proven and self-tested code base.

Features
  • Drupal 8 ready: drupal_ti supports both Drupal 7 and 8 modules. Use DRUPAL_TI_ENVIRONMENT="drupal-8" for your Drupal 8 modules.
  • Tested: drupal_ti tests its own code base for both Drupal 7 and Drupal 8 modules.
  • Modular architecture: drupal_ti has so called 'runners' and you can combine either e.g. "phpunit simpletest" or run them as separate workers by specifying a matrix.
  • Environment aware: drupal_ti has a file for each environment, which makes the code generic for both Drupal 7 and 8.
  • Examples provided: drupal_ti provides easy examples of the needed files in tests/drupal-{7,8}/drupal_ti_test. So you can get started easily!
  • Extensible: By specifying DRUPAL_TI_SCRIPT_DIR_BEFORE or DRUPAL_TI_SCRIPT_DIR_AFTER you can easily create your own runners and environment includes that run before or after the main runners. This could even come from composer.
  • Usable for non-travis CI: Because drupal-ti is just a command and because .travis.yml just has some environment vars, you can just copy the main declarations to some environment.sh file, set the TRAVIS_BUILD_DIR and use it locally, too.
An Example Conversion

My module registry_autoload uses simpletest on drupal.org to test its features. Now I want to test some advanced trait support, which needs PHP 5.4, so travis-ci.org is an option to do so.

Step 1 - Create the GitHub Repository and Push Your Code
  1. Sign in to github.com
  2. Click: + > New repository, enter: registry_autoload
  3. Click: Create repository

Copy the commands displayed by Github to push your code to GitHub. I like to use drupal.org as my upstream and GitHub as my origin remote:

$ git clone --branch 7.x-1.x Fabianx@git.drupal.org:project/registry_autoload.git $ cd registry_autoload $ git remote rename origin upstream $ git remote add origin git@github.com:LionsAd/registry_autoload.git $ git push -u origin 7.x-1.x Step 2 - Activate Travis-ci.org

Now head over to travis-ci.org:

  1. Choose "Sign in with GitHub" and follow instructions
  2. Click on your name at the top right, "Fabian Franz" for me
  3. Click: "Sync now" if you don't see the repository, yet
  4. Simply switch the toggle to "ON" for the project
  5. Click on the repository settings icon (the "tools icon")
  6. Toggle "Build only if .travis.yml is present"
  7. Click on "Build history"
  8. Leave the browser window open
Step 3 - Add drupal_ti .travis.yml

Now checkout a new branch, and add the .travis.yml file:

$ git checkout -b travis-integration $ curl https://raw.githubusercontent.com/LionsAd/drupal_ti/master/.travis.yml.dist -O $ mv .travis.yml.dist .travis.yml

Then, customize the following parts of the file:

# Configuration vars. - DRUPAL_TI_MODULE_NAME="registry_autoload" - DRUPAL_TI_SIMPLETEST_GROUP="Registry"

And:

matrix: # [[[ SELECT ANY OR MORE OPTIONS ]]] - DRUPAL_TI_RUNNERS="simpletest"

The simpletest group is returned from getInfo() in Drupal 7, but an annotation @group x in Drupal 8. Despite the name of the variable, you could also put in a class like RegistryAutoloadTestCase. Basically anything that SimpleTest accepts on the command line as last argument. The clue is that this variable accepts spaces e.g. "DrupalTi Test", which is else very difficult to achieve when passing variables around.

Now add the file and push to GitHub:

$ git add .travis.yml $ git commit -m "Added travis integration" $ git push origin travis-integration Step 4 - Watch the Test Run

Now head back over to your browser window and magically there will be a new build, click on it and you will see a matrix like structure, here shown for build #2:

Click on PHP 5.4 and click the little button on the far right with "follow", to follow the output.

After a while the build is finished and all tests passed:

Congratulations, your project is now tested on travis-ci.org!

Now merge, the branch into your mainline and whenever you want to test a change on travis-ci.org just push a branch or make a pull request:

$ git checkout 7.x-1.x $ git merge travis-integration $ git push origin 7.x-1.x # Also push the changes back to drupal.org $ git push upstream 7.x-1.x

The easiest way to work with this kind of integration is to push all patches to origin first and once satisfied, push to upstream. That way GitHub and drupal.org are always in sync.

To be Continued…

In the next part of this series, I will explore how you can get started with unit testing locally and on travis-ci.org (using drupal_ti) and afterwards we will take a look at some easy behat setup.

If you are curious and want to start now, take a look at the run-* scripts in:

Enjoy and please leave me feedback either in the Drupal issue queue or on the GitHub project page.

About the Author

Fabian Franz is a Senior Performance Engineer and Technical Lead at Tag1
Consulting. He is author of the registry_autoload, service_container and render_cache modules for Drupal 7 and a contributor to Drupal 8 Core in the form of reviews, patches, and co-leader of the Twig initiative.

Tags:  Testing Contributed modules Third-party tools Images: 

Aten Design Group: Debugging New to You Drupal Blocks

Drupal News - December 9, 2014 - 8:20am

Let’s say a friend (or a new client) asks you to make a small change to their Drupal website. You’ve never seen this site before and the original developer(s) are long gone. Of course the text is in some obscure block. Sometimes finding where to make the requested change is easy. Sometimes it’s not. I’m going to go through some debugging tips for such a case.

The first thing you should do is inspect that part of the page with your browser’s dev tools (e.g. Firefox, Chrome). Often IDs and class names will help identify the block.

Here’s an example of the DOM of a view block from the nodequeue module.

<div id="block-views-nodequeue-2-block" class="block block-views contextual-links-region block--marquee">

The ID "block-views-nodequeue-2-block" means this is a views block. "nodequeue-2" is the view machine name, and "block" is the name of the specific display in that view. You can browse the list of views at /admin/structure/views, or in this case, go directly to /admin/structure/views/view/nodequeue_2/edit/block. The path to edit a view in Drupal 7 is always at /admin/structure/views/view/[VIEW NAME]/edit/[DISPLAY NAME]. If contextual links are on, it may be even quicker to access the edit page from the options available. Look for a gear icon in the upper right corner of the section.

Here’s a block defined in code:

<div id="block-cei-custom-blocks-cei-unicef-timeline" class="block block-cei-custom-blocks contextual-links-region">

In this case in cei_custom_blocks_block_info() defines a block delta: $blocks['cei_unicef_timeline'] The code that defines this block’s output will either be in cei_custom_blocks_block_view() or that function will call another.

In one particular case I didn’t have a lot to go on. There was very little in the DOM. This members page consisted of user images, name, and title. The client requested one additional field be included for each user on the members page. It wasn’t a view or anything else easily identifiable. The output was in system block 0 which doesn't give me anything to go on. One particularly unique class name was block-totem-common-embed-type-search-0 (this was the totem install profile) but a search of the code turned up nothing. That’s because the code that built these blocks was highly abstracted. Reviewing that code didn’t reveal where I could add the field either. Finally I searched on another class name. I didn’t find exactly where the class name was inserted, but it happened to match a template file that was in one of the submodule's ‘inc’ directories.

<div<?php print $attributes; ?>> <?php print $user_profile['images']['user_thumb']; ?> <?php print render($title_prefix); ?> <h3><?php print render($user_profile['name']); ?></h3> <?php print render($title_suffix); ?>   <div class="clearfix"></div> </div>

Once I found that, making the needed modification was simple.

To help identify a block, you can also look at what is placing the block on the page. Some ways this can be done include the blocks UI, Context module, Panels, print directly in code, and template files. If a lot of blocks are placed using the blocks UI, this page can get unwieldy. It’s worth searching the codebase for any distinct phrases. A quick search in the database can also be useful.

Blocks saved in the database are in the blocks and blocks_custom tables. One way to find such a block in the database uses a query for some matching text:

SELECT * FROM block_custom WHERE body LIKE "%participate in discussions%"\G

The query matched the following entry:

*************************** 1. row *************************** bid: 3 body: <p><strong>A message from the GEC team</strong></p> <p>During the recent GEC baseline sharing events, one of the key messages that came through loud and clear from you was the value of meeting other projects and exchanging knowledge, sharing challenges, solutions, experiences and advice. We began to see the GEC community take root, and to continue this momentum we are launching the GEC forum &ndash; a place for the GEC Community of Practice to develop and grow. This will be the place for you share your expertise, participate in discussions, and interact with other projects that form the community of the Girls&rsquo; Education Challenge. <a href="http://www.educationinnovations.org/forums/introducing-girls%E2%80%99-education-challenge-forum">Read more...</a></p> <p>&nbsp;</p>   info: GEC welcome message (deliberately not in code) format: full_html

Such a block can be edited at /admin/structure/block/manage/block/3/configure. The path to edit a block is always at /admin/structure/block/manage/[Block ID]/configure.

Hopefully these tips will be useful the next time a completely unknown website is dropped in your lap.

Acquia: PHP: Under the Hood, Running the Web

Drupal News - December 9, 2014 - 8:13am

Most non-technical people out on the Web haven't heard of PHP before. They might not have even heard of many of the products that were built with this technology like Drupal, Magento, or WordPress. And together with other products built with PHP, these run about 83% of all internet web applications. The technology of PHP is very important to an enormous number of businesses, governments, and organisations around the world, so even though people might not be familiar with the language itself, there’s a very good chance they’ve used it online today.

Damien McKenna: Need help with (final?) release of Panels for Drupal 6

Drupal News - December 8, 2014 - 7:11pm

After more than two and a half years since the last release, we need some help putting together what might be the final release of Panels for Drupal 6:

Tags: 

James Oakley: Installing the latest version of Drush

Drupal News - December 8, 2014 - 3:21pm

In case you missed it, Drush has evolved recently.

Quick primer for beginners follows. (Although, if you haven't heard of Drush, the chances are this post was not written with you in mind. I blog about many subjects, and there aren't many readers who are interested in all of them!)

Drush stands for Drupal shell - it's a very powerful shell environment for managing Drupal sites using the command-line shell. … Read more about Installing the latest version of Drush

Blog Category: Drupal Planet

Visitors Voice: Milestone reached regarding Search API for Drupal 8

Drupal News - December 8, 2014 - 11:55am
For all of us who care about site search for Drupal, the maintainer Thomas Seidl has written a report about the current status of Search API for Drupal 8. The search crew’s vision is not only to port Search API to Drupal 8, but also to remove all known limitations, making site search for Drupal […]

Appnovation Technologies: How to properly use PHP on Drupal views fields

Drupal News - December 8, 2014 - 9:58am

Every once in a while, as a Drupal site builder you will come across this problem.

Nuvole: Atrium Folders for Open Atrium 2

Drupal News - December 8, 2014 - 9:19am
Subtitle: Nuvole's files and documents management feature is now available for the latest version of Open Atrium

We received many requests to make an updated version of our Atrium Folders feature available for the latest version of Open Atrium, the excellent Drupal-based solution for Intranets developed by Phase2.

OECD sponsored the development of the new version as an open source project, in order to add a file management functionality to the Innovation Policy Platform site that it manages together with the World Bank. Atrium Folders for Open Atrium 2 is thus now available to everybody.

The usual features, a new way

Open Atrium changed completely and so did Atrium Folders. There are many differences under the hood, with a complete code rewrite, but the familiar user experience is still there.

Uploading and downloading files

Creating folders and adding files to the folders is as easy as creating any other content in Open Atrium 2: it is enough to create "Files sections". When you are viewing a folder, specific buttons allow to create subfolders, upload files and directly download any file.

Access management

The access management works like for other nodes in Open Atrium. Access to the folder can be restricted for both viewing and editing separately, and it can be determined at a folder level.

Notifications

The notification system of Open Atrium can also be used for folders. Users can be informed when new files are added, with the same interface used by other Open Atrium features.

And much more Media module support

The files are attached with the Media widget and it is thus possible to manage not only files, but everything Media supports, like for example YouTube videos or files attached to other content.

Multiple uploads, with drag and drop support

The multi-upload feature of Open Atrium 2 can also be used with Folders to upload several files at the same time. Drag and drop uploads are supported too.

Download folder as ZIP file

The download button for files exists also for folders and it allows to download a folder with its subfolders and all included files as a ZIP archive. This functionality is available as a submodule, bundled with Atrium Folders.

File and folder revisions

Atrium Folders supports history and revisions both for folders and files. You can view previous versions of a file and optionally restore an older version. This functionality is available as a submodule, bundled with Atrium Folders.

Download, installation and support

The Open Atrium Folders feature can be downloaded and installed like any other module.

It is available on drupal.org at https://www.drupal.org/project/oa_folders/

Please report any issues in the module's issue queue at drupal.org

Tags: Drupal PlanetOpen Atrium

Dries Buytaert: Announcing the Drupal 8 Accelerate Fund

Drupal News - December 8, 2014 - 9:01am
Topic: DrupalDrupal Association

Today the Drupal Association announced a new program: the Drupal 8 Accelerate Fund. Drupal 8 Accelerate Fund is a $125,000 USD fund to help solve critical issues and accelerate the release of Drupal 8.

The Drupal Association is guaranteeing the funds and will try to raise more from individual members and organizations within the Drupal community. It is the Drupal 8 branch maintainers — Nathaniel Catchpole, Alex Pott, Angie Byron, and myself — who will decide on how the money is spent. The fund provides for both "top-down" (directed by the Drupal 8 branch maintainers) and "bottom-up" (requested by other community members) style grants. The money will be used on things that positively impact the Drupal 8 release date, such as hiring contributors to fix critical bugs, sponsoring code sprints to fix specific issues, and other community proposals.

Since the restructuring of the Drupal Association, I have encouraged the Drupal Association staff and Board of Directors to grow into our ambitious mission; to unite a global open source community to build and promote Drupal. I've also written and talked about the fact that scaling Open Source communities is really hard. The Drupal 8 Accelerate Fund is an experiment with crowdsourcing as a means to help scale our community which is unique compared to other efforts because it is backed by the official non-profit organization that fosters and supports Drupal.

I feel that the establishment of this fund is an important step towards more sustainable core development. My hope is that if this round of funding is successful that this can grow over time to levels that could make an even more meaningful impact on core, particularly if we complement this with other approaches and steps, such as organization credit on Drupal.org.

This is also an opportunity for Drupal companies to give back to Drupal 8 development. The Drupal Association board is challenging itself to raise $62,500 USD (half of the total amount) to support this program. If you are an organization who can help support this challenge, please let us know. If you're a community member with a great idea on how we might be able to spend this money to help accelerate Drupal 8, you can apply for a grant today.

Code Enigma: Meaningful commit messages

Drupal News - December 8, 2014 - 4:51am
At Code Enigma, most of our Jenkins builds post a git log into one of our IRC channels on completion. This helps the ops team to keep an eye on what's going on and to quickly spot any build failures. It also gives us a chance to see the commit messages that people are posting.

Annertech: Twitter Cards - Up Close and Drupally

Drupal News - December 8, 2014 - 1:12am
Twitter Cards - Up Close and Drupally

We've all heard of Twitter, how it can help you boost your business and engage with your supporters. But have you ever noticed that some tweets now come with a nice little description, or maybe an image, or even an embedded video?

That's the magic of Twitter cards, and you can do it with Drupal.

Drupal Bits at Web-Dev: Manage Drupal Feature Updates

Drupal News - December 5, 2014 - 8:38pm

When using Features module to move changes from one  development environment to the next, it can be tricky to track which Feature ought to be 'reverted' in order make the new code be incontrol.  Sure you can revert them all in one shot with `drush features-revert-all`, but that is pretty intensive to do especially on a production site and can lead to some race conditions.

Code Karate: Drupal Role Assign Module: Controlling who can assign what roles on your Drupal site

Drupal News - December 5, 2014 - 3:27pm
Episode Number: 183

By default a Drupal site has a lot of flexibility when it comes to assigning user roles and permissions. There are times however when the default flexibility is not quite enough. The Drupal Role Assign Module extends this flexibility a little by allowing more fine grained control over setting user roles.

The Drupal RoleAssign module allows you to allow other roles to assign users roles... confused yet? An example might be helpful. Assume you have the following Drupal roles on your site:

Tags: DrupalUsersDrupal 7Drupal Planet

Announcing the Drupal 8 Accelerate Program

Drupal News - December 5, 2014 - 3:16pm

We are thrilled to announce that, in collaboration with the Drupal 8 branch maintainers, the Association is launching a brand-new program: Drupal 8 Accelerate. Modeled after our Community Cultivation Grants program, Drupal 8 Accelerate is a $125,000 fund to help solve critical issues and accelerate the release of Drupal 8.

The Drupal community is filled with a plethora of opinions and ideas, but there’s one thing we likely all agree on; we’re ready for Drupal 8 to be released! This anticipation is underscored by the record number of contributors to D8 - over 2400. Now it’s time for the Drupal community to rally and finish the job. The Drupal Association wants to help you make that happen. After all, our mission is to unite a gobal open source community to build and promote Drupal.

The Drupal 8 Accelerate Program is a $125,000 fund provided by the Drupal Association (and by extension, all the Association members and Partners who fund our work - so thank you). Grants will be made in two categories: branch maintainer requests and community requests. This two-branch system means that funds can be directed by the people most intimately familiar with the project needs while still allowing for our amazing community to come up with innovative ideas that have a big impact. The Association will also be providing logistical support to the branch maintainers throughout the process.

While the Association is providing the funds and the support, we are not deciding WHAT gets funded. This gets handled by the branch maintainers, keeping the Association on the right side of the “we don’t direct the project” line. The Drupal 8 Accelerate program is a fantastic opportunity for the Association to support and amplify community efforts. All of our favorite work at the Association follows this model - DrupalCon session selection, Community Cultivation Grants, Global Training Days, and DrupalCamp Fiscal Sponsorship to name a few. We’re here to make it easier for you to innovate, and this program is yet another example.

Of course, this is the first time our community has tried anything like this, so we expect that we’ll be learning a lot as we go. As always, we are looking for your feedback and help so that we can improve.

How can you help? Let me count the ways:

  • Help promote the program. Share this blog post on Twitter, Facebook, and other places your Drupal friends hang out online.
  • Apply! Take this program back to your user group, company, or friends and dream big. If you have a great way to help push Drupal 8 to release, we want to hear about it.
  • Help fund the grants. The Association has pledged $125,000 because we think this program is THAT important. But we’re looking for community support to help make this investment. You can become member, a partner, or talk to us about making a contribution directly to the fund.

A huge round of thanks goes to Angie, Jess, Gabor, Cathy, Nate and the other branch maintainers who helped develop and review this program. We’re excited to see what happens next!

Drupal Association News: Announcing the Drupal 8 Accelerate Program

Drupal News - December 5, 2014 - 3:16pm

We are thrilled to announce that, in collaboration with the Drupal 8 branch maintainers, the Association is launching a brand-new program: Drupal 8 Accelerate. Modeled after our Community Cultivation Grants program, Drupal 8 Accelerate is a $125,000 fund to help solve critical issues and accelerate the release of Drupal 8.

The Drupal community is filled with a plethora of opinions and ideas, but there’s one thing we likely all agree on; we’re ready for Drupal 8 to be released! This anticipation is underscored by the record number of contributors to D8 - over 2400. Now it’s time for the Drupal community to rally and finish the job. The Drupal Association wants to help you make that happen. After all, our mission is to unite a gobal open source community to build and promote Drupal.

The Drupal 8 Accelerate Program is a $125,000 fund provided by the Drupal Association (and by extension, all the Association members and Partners who fund our work - so thank you). Grants will be made in two categories: branch maintainer requests and community requests. This two-branch system means that funds can be directed by the people most intimately familiar with the project needs while still allowing for our amazing community to come up with innovative ideas that have a big impact. The Association will also be providing logistical support to the branch maintainers throughout the process.

While the Association is providing the funds and the support, we are not deciding WHAT gets funded. This gets handled by the branch maintainers, keeping the Association on the right side of the “we don’t direct the project” line. The Drupal 8 Accelerate program is a fantastic opportunity for the Association to support and amplify community efforts. All of our favorite work at the Association follows this model - DrupalCon session selection, Community Cultivation Grants, Global Training Days, and DrupalCamp Fiscal Sponsorship to name a few. We’re here to make it easier for you to innovate, and this program is yet another example.

Of course, this is the first time our community has tried anything like this, so we expect that we’ll be learning a lot as we go. As always, we are looking for your feedback and help so that we can improve.

How can you help? Let me count the ways:

  • Help promote the program. Share this blog post on Twitter, Facebook, and other places your Drupal friends hang out online.
  • Apply! Take this program back to your user group, company, or friends and dream big. If you have a great way to help push Drupal 8 to release, we want to hear about it.
  • Help fund the grants. The Association has pledged $125,000 because we think this program is THAT important. But we’re looking for community support to help make this investment. You can become member, a partner, or talk to us about making a contribution directly to the fund.

A huge round of thanks goes to Angie, Jess, Gabor, Cathy, Nate and the other branch maintainers who helped develop and review this program. We’re excited to see what happens next!

Drupal core announcements: Priorities for the upcoming Drupal 8 critical issue sprint (Dec. 10-14 in Ghent, Belgium)

Drupal News - December 5, 2014 - 2:32pm

It's just a few days now until our Drupal 8 criticals sprint in Ghent! The sprint will be held December 10-14, 2014 and hosted at the Wunderkraut offices.

Upgrade path blockers

Our top priority for the sprint will be to make progress on D8 upgrade path blockers (critical issues with the 'D8 upgrade path' tag) that affect the Entity Field API, Views, and the Configuration System. Here are the specific issues we have targeted:

#2372855: Add content & config entity dependencies to views
#2341357: Allow the entity area to use UUIDs instead of IDs and provide autocompletion

Discuss and plan our approach. (The second issue, #2341357, is a soft blocker that covers part of the scope of the first, #2372855.)
 

[PP-1] Figure out what to do in Views when entity schema changes

Discuss and plan our approach.
 

#1934152: Figure the out if we want global config overrides to stick (settings.php overrides don't work on all pages)

Discuss, make a decision, and move forward.
 

#2278017: [PP-1] When a content entity type providing module is uninstalled, the entities are not fully deleted, leaving broken references
#2338873: [PP-2] Modules providing non-configurable field storage definitions can be uninstalled, leaving orphaned unpurged data

These issues are postponed on #2335879: Change SqlContentEntityStorageSchema::requiresEntityDataMigration() to ask the old storage handler if it has data rather than assuming yes unless NULL storage, but that will hopefully land before the sprint. The first issue (#2278017) is proceeding well and can hopefully be wrapped up in the sprint, and then the second (#2338873) will hopefully be a straightforward application of the same pattern. In addition to these issues, we may also want to create a new issue to add a config validator that does the same validation check during a config deployment.
 

#2183983: Find hidden configuration schema issues
#2387149: Display extenders are not possible to describe with config schema
#2387157: Cloning display into another display also stores options that are not supported by the new display type

Agree on the API needed for the Views child issues. Then, continue to resolve outstanding failures in the main issue. It would be great to either finish these by the end of the sprint or get far enough to know the reason for each remaining failure to have confidence there's no lingering huge problem! (#2387141: Missing field configuration schemas across core tests should be hopefully done before the sprint starts.)
 

#2232477: Fatal when adding new fields with NOT NULL constraints in a base table that contains existing entities

This issue was discussed in Amsterdam, committed, and then reverted. yched has been working on the patch since; we could probably focus on this issue together and discuss the issues with the previous patch to move this forward.
 

Critical issue triage

Another goal of the sprint is to triage critical issues in the core queue to assess their relevance and priority. (You can help by making sure any open critical issues you are following have up-to-date issue summaries.)

Sponsors

Thanks to the Drupal Association and Wunderkraut for sponsoring this event!

More information

If you have any questions about the upcoming sprint, contact xjm.

David Norman: Drupal 8's installer and Xdebug don't mix

Drupal News - December 5, 2014 - 2:20pm

Anecdotally, Drupal 8 is slower than anything before it - maybe 4x slower. While installing Drupal 8.0.0-beta3 so I could work on upgrading the Masquerade module, I found the installer dreadfully slow. I started a timer when I got to the Batch API-enabled "Install site" page. The installer ran for 10 minutes to get as far as step 32 of 37. Then it errored-out.

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://localhost/drupal8/core/install.php?langcode=en&profile=standard&i... StatusText: OK ResponseText: ( ! ) Fatal error: Maximum execution time of 30 seconds exceeded in /Users/davidnorman/Sites/drupal8/core/lib/Drupal/Core/Extension/ModuleHandler.php on line 261

I've installed Drupal probably thousands of times and I knew my MacBook Pro Retina, 3rd-generation quad core i7 processor with a SSD wasn't a bottleneck. At the time, I only had one extra PHP extension enabled - Xdebug (see my phpinfo()). It only had a basic configuration. Sometimes I enable things like xdebug.collect_assignments or xdebug.show_local_vars, but even those weren't enabled at the time.

[xdebug] zend_extension="/usr/local/Cellar/php56-xdebug/2.2.6/xdebug.so" xdebug.auto_trace = On

To get Drupal to install, I commented the Xdebug zend_extension at /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini, did a brew install php56-apcu, and restarted my MacBook.

After I swapped Xdebug for APCU, the "Install site" portion of the Drupal 8 installer took only 30 seconds to complete and did not time-out, versus the 10 minutes with ultimate failure while Xdebug was enabled.

At this point, I'm seem to be left to conclude that if I wanted to use Xdebug to debug the installer, that my only option is to increase the default 30 second timeout in my /usr/local/etc/php/5.6/php.ini. Alternatively, if I want to use Xdebug for day-to-day module development, that I'll need to disable Xdebug temporarily to get a local install setup.

Drupal 8 does a lot more stuff to process a page. Core developers have succeeded in moving most of the code to use object oriented methods with namespaces and protected variable spaces, but at the expense of turning a vanilla install into about 76MB. Drupal 7.34 is only 15MB.

To make a point, I inserted a debug_print_backtrace() in EntityAccessControlHandler::access(). This is a basic call in core that would check access on anything that's an entity - users, nodes, etc. After Firefox choked on the resulting output, I attempted to make a snapshot of the page using Evernote to link to in this article. Instead, even Evernote told me that the page was too big to capture.

I guess I don't really have any other point to make. It's not like this article is going to make Drupal 8 faster. I don't have advice for making it lightweight. It's what we have to live with now in the supposed pursuit of progress and modern sophistication. I'm just leaving my breadcrumb for other developers who might find it impossible to even get Drupal 8 installed using an environment that worked for Drupal 7 since I was able to get through the "Install site" part of the Drupal 7.34 installer with Xdebug enabled and with APCU disabled in only 14 seconds.

Post categories Drupal

Mediacurrent: A better Access Denied (403) page with Panels

Drupal News - December 5, 2014 - 1:53pm

What happens when a user bookmarks an access-protected page? If their session expires before they next visit the bookmark, they'll see an "Access Denied" message with no login form. How confusing for the end user! Let's change that.

Syndicate content