Quantcast
Channel: Issues for Drupal core
Viewing all 293247 articles
Browse latest View live

Win 10 shortcuts inaccessible from CKeditor image widget

$
0
0

Came to add an image with the new Drupal 8 CKeditor image-widget and got error when trying to access the Windows (10) shortcut to the folder in which this image sits.

When I access Symlinks on my Ubuntu 15.10 on the other hand, this does not happen;

I guess some kind of allowance is needed regarding to Windows shortcuts.


The method Drupal\Core\Database\Query\Condition::compile is too long and complex

$
0
0

The method Drupal\Core\Database\Query\Condition::compile is too long and complex, and very deeply nested. That results in a very high cyclomatic complexity. Is there any way we can break it up into a series of sub-methods? At minimum, it looks like the main foreach()'s body could get split off to a sub-method. There may be others, or it may just to too complex to do, but it would be great if we could at least try.

Replace deprecated references to ThemeHandler::install() by ThemeInstaller

API docs reference ModuleHandler::install() instead of ModuleInstaller

$
0
0

The documentation for hook_modules_installed() still refers twice to \Drupal\Core\Extension\ModuleHandler::install() although this has been replaced by \Drupal\Core\Extension\ModuleInstaller::install() in https://www.drupal.org/node/1894902.

Some (all ?) locations where this still exists are:

  • hook_modules_installed($modules) (2)
  • module_set_weight()
  • InstallerServiceProvider::alter()
  • LanguageNegotiator::purgeConfiguration() and ::updateConfiguration() (4 in all: install and uninstall)
  • ModuleHandlerTest::testDependencyResolution() and ::testDependencyResolution() (3 install and 1 uninstall, although the logic is correct, this is just in the error messages), and 5 uninstall in testUninstallContentDependency()

Mismatched entity and/or field definitions after upgrade from RC1 to RC2

$
0
0

I have Drupal 8 installed beginning of RC1 and afterward upgraded successfully up to 8.0. The status report page from the very first version is displaying:

Entity/field definitions Mismatch detected
Mismatched entity and/or field definitions.

Currently I have some common extensions installed but at the beginning the error was displayed even in the core.

My webpage is in polish language.

I was trying to install drush tu update entities but can't get it working properly (http://drupal.stackexchange.com/questions/179201/command-entity-updates-...).

Module Page:504 Gateway Time-out nginx/1.3.7

$
0
0

Hi ,please am currently facing a challenge with drupal 7.43,when ever i try to access the module page i keep getting this error "504 Gateway Time-out
nginx/1.3.7".Other pages works fine.Any help will be appreciated.

Tests in class Drupal\taxonomy\Tests\TaxonomyImageTest are failing

$
0
0

The Drupal files folder has already recursive 777 permissions.

If I run

php core/scripts/run-tests.sh --url http://pbt-d8 --verbose --color --concurrency 4 --class 'Drupal\taxonomy\Tests\TaxonomyImageTest'

I get the following output:

Drupal test run
---------------

Tests to be run:
- Drupal\taxonomy\Tests\TaxonomyImageTest

Test run started:
Saturday, July 30, 2016 - 15:24

Test summary
------------

Fatal error: Uncaught Error: Call to a member function getName() on boolean in /home/peter/Websites/pbt-d8/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php on line 82

Error: Call to a member function getName() on boolean in /home/peter/Websites/pbt-d8/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php on line 82

Call Stack:
0.0009 554272 1. {main}() /home/peter/Websites/pbt-d8/core/scripts/run-tests.sh:0
0.2967 13437312 2. simpletest_script_run_one_test() /home/peter/Websites/pbt-d8/core/scripts/run-tests.sh:59
0.3007 14373568 3. Drupal\simpletest\TestBase->run() /home/peter/Websites/pbt-d8/core/scripts/run-tests.sh:723
16.9580 42522752 4. Drupal\taxonomy\Tests\TaxonomyImageTest->testTaxonomyImageAccess() /home/peter/Websites/pbt-d8/core/modules/simpletest/src/TestBase.php:1057

FATAL Drupal\taxonomy\Tests\TaxonomyImageTest: test runner returned a non-zero error code (255).
Drupal\taxonomy\Tests\TaxonomyImageTest 0 passes 1 fails
- Found database prefix 'simpletest400222' for test ID 9.
[30-Jul-2016 23:24:30 Australia/Sydney] PHP Fatal error: Uncaught Error: Call to a member function getName() on boolean in /home/peter/Websites/pbt-d8/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php:82
Stack trace:
#0 /home/peter/Websites/pbt-d8/core/modules/simpletest/src/TestBase.php(1057): Drupal\taxonomy\Tests\TaxonomyImageTest->testTaxonomyImageAccess()
#1 /home/peter/Websites/pbt-d8/core/scripts/run-tests.sh(723): Drupal\simpletest\TestBase->run(Array)
#2 /home/peter/Websites/pbt-d8/core/scripts/run-tests.sh(59): simpletest_script_run_one_test('9', 'Drupal\\taxonomy...')
#3 {main}
thrown in /home/peter/Websites/pbt-d8/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php on line 82

- Removed test site directory.
- Removed 38 leftover tables.

Test run duration: 25 sec

Detailed test results
---------------------

---- Drupal\taxonomy\Tests\TaxonomyImageTest ----

Status Group Filename Line Function
--------------------------------------------------------------------------------
Fail Completion TaxonomyImageTest 69 Drupal\taxonomy\Tests\TaxonomyImage
The test did not complete due to a fatal error.
Pass Other TaxonomyTestBase. 27 Drupal\taxonomy\Tests\TaxonomyTestB
Enabled modules: image, taxonomy, block
Pass Other TaxonomyTestBase. 32 Drupal\taxonomy\Tests\TaxonomyTestB
Created content type article.
Pass Role TaxonomyImageTest 70 Drupal\taxonomy\Tests\TaxonomyImage
Created role ID 'tmmomjxd' with name '5nue>&q_'.
Pass Role TaxonomyImageTest 70 Drupal\taxonomy\Tests\TaxonomyImage
Created permissions: administer site configuration, administer taxonomy,
access user profiles
Pass User login TaxonomyImageTest 70 Drupal\taxonomy\Tests\TaxonomyImage
User created with name tCmYqaOh and pass TjWEuepGD8
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Pass Browser TaxonomyImageTest 71 Drupal\taxonomy\Tests\TaxonomyImage
GET http://pbt-d8/user/login returned 200 (270.59 KB).
Pass Browser TaxonomyImageTest 71 Drupal\taxonomy\Tests\TaxonomyImage
Valid HTML found on "http://pbt-d8/user/login"
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Pass Browser TaxonomyImageTest 71 Drupal\taxonomy\Tests\TaxonomyImage
GET http://pbt-d8/user/2 returned 200 (327.1 KB).
Pass Browser TaxonomyImageTest 71 Drupal\taxonomy\Tests\TaxonomyImage
Valid HTML found on "http://pbt-d8/user/2"
Pass User login TaxonomyImageTest 71 Drupal\taxonomy\Tests\TaxonomyImage
User tCmYqaOh successfully logged in.
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Pass Browser TaxonomyImageTest 78 Drupal\taxonomy\Tests\TaxonomyImage
GET http://pbt-d8/admin/structure/taxonomy/manage/vjvz1ts3/add returned 200
(676.96 KB).
Pass Browser TaxonomyImageTest 78 Drupal\taxonomy\Tests\TaxonomyImage
Valid HTML found on
"http://pbt-d8/admin/structure/taxonomy/manage/vjvz1ts3/add"
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Exception Warning FileStorage.php 165 Drupal\Component\PhpStorage\FileSto
mkdir(): Permission denied
Exception Warning FileStorage.php 176 Drupal\Component\PhpStorage\FileSto
mkdir(): No such file or directory
Pass Browser TaxonomyImageTest 78 Drupal\taxonomy\Tests\TaxonomyImage
POST http://pbt-d8/admin/structure/taxonomy/manage/vjvz1ts3/add returned
200 (583.76 KB).
Pass Browser TaxonomyImageTest 78 Drupal\taxonomy\Tests\TaxonomyImage
Valid HTML found on
"http://pbt-d8/admin/structure/taxonomy/manage/vjvz1ts3/add"
Fail Other TaxonomyImageTest 79 Drupal\taxonomy\Tests\TaxonomyImage
Failed to set field field_test[0][alt] to lMOxWiCF
Pass Other TaxonomyImageTest 79 Drupal\taxonomy\Tests\TaxonomyImage
Found the Save button
Fail Other TaxonomyImageTest 79 Drupal\taxonomy\Tests\TaxonomyImage
Found the requested form fields at
Fail run-tests. Unknown 0 Unknown
FATAL Drupal\taxonomy\Tests\TaxonomyImageTest: test runner returned a
non-zero error code (255).
Fail Fatal erro Unknown 0 Unknown
[30-Jul-2016 23:24:30 Australia/Sydney] PHP Fatal error: Uncaught Error:
Call to a member function getName() on boolean in
/home/peter/Websites/pbt-d8/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php:82
Fail Fatal erro Unknown 0 Unknown
Stack trace:
Fail Fatal erro Unknown 0 Unknown
#0
/home/peter/Websites/pbt-d8/core/modules/simpletest/src/TestBase.php(1057):
Drupal\taxonomy\Tests\TaxonomyImageTest->testTaxonomyImageAccess()
Fail Fatal erro Unknown 0 Unknown
#1 /home/peter/Websites/pbt-d8/core/scripts/run-tests.sh(723):
Drupal\simpletest\TestBase->run(Array)
Fail Fatal erro Unknown 0 Unknown
#2 /home/peter/Websites/pbt-d8/core/scripts/run-tests.sh(59):
simpletest_script_run_one_test('9', 'Drupal\\taxonomy...')
Fail Fatal erro Unknown 0 Unknown
#3 {main}
Fail Fatal erro Unknown 0 Unknown
thrown in
/home/peter/Websites/pbt-d8/core/modules/taxonomy/src/Tests/TaxonomyImageTest.php
on line 82

drupal_log_error() should log a backtrace

$
0
0

Patch to commit is in #9.

Problem/Motivation

Software has bugs, so errors are there and will be logged.
Sadly by default Drupal just puts the line of the broken code, which is already helpful, but on the other hand often now really helpful, because you need a full backtrace to figure something out.

Proposed resolution

Log a backtrace on top of the actual error message.
This will just make the backtrace available in the variables section, but won't be displayed as part of the watchdog site.

Remaining tasks

User interface changes

API changes

Data model changes


Entity form/view route errors when a non-entity parameter comes first

$
0
0

Problem/Motivation

Let's take this route:

some_route:
  path: /example/{argument}/{entity_test}
  defaults:
    _entity_form: 'entity_test.edit'
  options:
    parameters:
      argument:
        type: 'argument_type'

When this route is resolved next PHP error pops up:

Notice: Undefined offset: 1 in Drupal\Core\Entity\EntityResolverManager->setParametersFromEntityInformation() (line 181 of core/lib/Drupal/Core/Entity/EntityResolverManager.php).

This happens only when the non-entity parameter comes first. The "test only" test proves the bug.

Proposed resolution

Fix it.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Add provider selection to Permission page.

$
0
0

Add a select element to permission page to allow a more granular presentation of each group of permissions. Make permission loading scale better when many modules are active and for those modules that dynamically create permissions more editable.

  • generates path base. ie :
    • by module: admin/people/permission/block
    • by role: admin/people/permissions/role/anonymous/block
  • Configurable default. sets 'all ' as default (traditional full permisison list)
  • completes missing local tasks
  • notice given it Administrator Role is set to role for Per Role selections (as all checkboxes are then disabled)

Translating field labels simply doesnt work

$
0
0

1) Create a new fresh Drupal 8 instance
2) Create a content type (e.g. "page") and add a field (e.g. "field_phone"). Edit the label to be "Telefon" (i.e. German word for phone)
3) Now, add "English" as a new language under "/admin/config/regional/language"
4) Install the "Config translation" module if it isnt installed yet
5) Go to "/admin/config/regional/config-translation"
6) You should see the field you've created ("Telefon") in the list
7) Click on "Translate". You should see all the languages in a list. Click on "Translate" next to "English"
8) You can enter an English version of the fields' label. Enter "Phone".
9) Now, select "Add content" and select the content type ("page") from step #2. You can enter a title etc and of course the phone number.
10) Enter some digits and click on "Save".
11) You are now seeing your page. The title and "Telefon: 123456".
12) There is no way whatsoever to get this "Phone: 123456". Neithing by changing the URL from "/de/node/1" to "/en/node/1" nor by anything else I've tried.
13) ??? Whats going on here? IMHO if this is not a bug at the very least this is completely unintuitive. I think it's a bug.

Typed config incorrectly implements Typed Data interfaces

$
0
0

Updated: Comment #10

Problem/Motivation

Right now, typed config implements the typed data interfaces but does not properly implements its API. Let's use this issue to work over that and fix things based upon
#1913328: Provide general list and map classes and
#1905230: Improve the typed data API usage of configuration schema
Regarding the data definitions I mostly see 'mapping' and 'sequence' as problematic, as they are non-valid top-level definition keys. Per-type specific keys are supposed to go below 'settings' and should be documented at the type's class. This could be moved during processing though.
Sequences seems to be equivalent to lists but use a totally different notation. We need to align it with the typed-data list notations. However, I think the way sequences are specified matches with what others suggested doing for typed data as well (and I agree with), so maybe we should re-work it for typed data first.
Issues I see with the current code:

  • Used type names, i.e. as returned from getType() have to be registered via the plugin discovery.

The way I see this could work:

  • Use the typed config manage to pre-process config schema definitions to valid typed data definitions. That's partly done already, but we need to make sure that we end up with data definitions matching the docs. Also the custom merging of type-definitions and data-definitions as done in the TypedConfigElementFactory right now could happen there.
  • Best, this processing of the definition would be available as its own helper function also.
  • Make the classes extend the new general Map and List classes as suiting (or not).
  • Make sure the classes properly implement the interfaces - I mostly see all validate() implementations violating the interface. Maybe we can re-used typed data tests for the map and ItemList classes.

Proposed resolution

This will be a set of patches, one step at a time, based on the previous list.

  • Use DataDefinitionInterface for typed config and make TypedConfigManager extend TypedDataManager reusing some of the implementation.
  • Add a TypedDataManagerInterface in order to be able to pass around either TypedConfgManager or TypedDataManager. That one should be extended by TypedConfigManagerInterface
  • Reuse some more TypedData classes for TypedConfig (Any, Map, List...). Maybe we can replace TypedConfig ones completely, maybe not, not sure yet.
  • Fix validation for Typed config elements, reusing (and maybe extending) TypedData validation

A patch replacing type 'undefined' to 'any' was propose but the 'undefined' type is in system.data_types.schema.yml

Add a Drupal Yaml wrapper so we can default to PECL Yaml component if it is available

$
0
0

Problem/Motivation

We should be defaulting to the PECL Yaml component if it is available as opposed to Symfony's because:
it is a performance improvement for reads (decoding)
and is YAML complient.

(Also, see #249)

We had originally talked about this way back in the beginning but it had been forgotten about.

Pecl YAML Profile

Proposed resolution

Add a YAML class that decides whether to use the extension or Symfony. There's no point in using plugins and plugins are too heavy for this -- it's not extensible.

Also, Created Symfony issue for their invalid parsing: https://github.com/symfony/symfony/issues/16234

They seem to be aligning themselves with PECL as well:
http://symfony.com/blog/new-in-symfony-3-1-yaml-deprecations

API changes

Config save no longer throws exceptions if the config object contains an object or resource. While we could make Symfony do this, yaml_emity() doesn't do this so we can't make this a requirement.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryTask|Bug because it is a performance improvement
Issue priorityMajor, because it saves actually something
Unfrozen changesNo
Prioritized changesYes, performance improvements
DisruptionNone

Major, no disruption, performance improvement so allowed.

Test "TaxonomyFieldFilterTest" fails

$
0
0

If I run

php core/scripts/run-tests.sh --class 'Drupal\taxonomy\Tests\Views\TaxonomyFieldFilterTest'

I get the following output:

Drupal test run
---------------

Tests to be run:
- Drupal\taxonomy\Tests\Views\TaxonomyFieldFilterTest

Test run started:
Saturday, July 30, 2016 - 16:47

Test summary
------------

Drupal\taxonomy\Tests\Views\TaxonomyFieldFilterTest 13 passes 12 fails
- Found database prefix 'simpletest666160' for test ID 67.

Test run duration: 23 sec

Use static caching for fetching View

$
0
0

When fetching the statistics information, static caching might make sense.

+++ b/core/modules/statistics/src/StatisticsDatabaseStorage.php
@@ -0,0 +1,143 @@
+  /**
+   * {@inheritdoc}
+   */
+  public function fetchViews($id) {
+    $views =  $this->connection
+      ->select('node_counter', 'nc')
+      ->fields('nc', ['totalcount', 'daycount', 'timestamp'])
+      ->condition('nid', $id, '=')
+      ->execute()
+      ->fetchAssoc();
+    return new StatisticsViews($views['totalcount'], $views['daycount'], $views['timestamp']);
+  }
also, static caching might make sense, again to avoid multiple queries when showing day and totalcount in the same view.

Remove type hint from drupal_rebuild()

$
0
0

Problem/Motivation

drupal_rebuild() has a type hint of classloader but sometimes you get only a decorator.
@see DrupalKernel constructor.

API changes

Remove type hint from drupal_rebuild() to look like DrupalKernel constructor.

Steps to reproduce the issue

Add the ApcClassLoader code from the default.settings.php to your active settings.php .

if ($settings['hash_salt']) {
  $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']);
  $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader);
  unset($prefix);
  $class_loader->unregister();
  $apc_loader->register();
  $class_loader = $apc_loader;
}

and try drush cr for example.

Autoloader not working properly - Class MigrateEvents not found

$
0
0

There is a problem with the autoloader when using two classes with the same name (but a different namespace).

I get a class not found error although the class has been properly listed in the use statements.

When installing Drupal the following error occurs:

Error: Class 'Drupal\migrate\Event\MigrateEvents' not found in Drupal\mymodule\EventSubscriber\MigrationEventSubscriber::getSubscribedEvents()

I have an install profile that enables migrate, migrate_plus, migrate_tools and the following eventsubscriber:


namespace Drupal\mymodule\EventSubscriber;

use Drupal\migrate\Event\MigrateEvents as MigrateEventsCore;
use Drupal\migrate\Event\MigratePostRowSaveEvent;
use Drupal\migrate_plus\Event\MigrateEvents as MigrateEventsPlus;
use Drupal\migrate_plus\Event\MigratePrepareRowEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class MigrationEventSubscriber implements EventSubscriberInterface {

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    $events[MigrateEventsPlus::PREPARE_ROW][] = array('onPrepareRow', 0);
    $events[MigrateEventsCore::POST_ROW_SAVE][] = array('onPostRowSave');
    return $events;
  }
   ...
}

Adding class_exists fixes the issue (as it will try to autoload the class):

    if (class_exists('Drupal\migrate\Event\MigrateEvents')) {
      $events[MigrateEventsCore::POST_ROW_SAVE][] = array('onPostRowSave');
    }

But the class should be autoloaded:

use Drupal\migrate\Event\MigrateEvents as MigrateEventsCore;
use Drupal\migrate_plus\Event\MigrateEvents as MigrateEventsPlus;

No active language in language switcher for URL with query string

$
0
0

Active language in language switcher does not have 'is-active' class if query string present in URL, e.g. pager ?page=0.

Enable "Count content views" by default

$
0
0

Problem/Motivation

Currently when the statistics module is enabled it doesn't do anything, the site builder is required to check the "Count content views" on the "/admin/config/system/statistics" admin page to start node views being counted. This is a left over from when the statistics module used to be an access log too, it allowed the site to have node counter and/or access log. Now that the module only has node counter why not enable it by default, also why not stop making it optional. As soon as the module is enabled node views are counted and the only way to disable is to disable the module.

Proposed resolution

- Remove the /admin/config/system/statistics admin page
- Remove the "count_content_views" setting
- Stop checking "count_content_views" === true

Remaining tasks

All the things

User interface changes

Removal of the admin page

API changes

Removal of the count_content_views setting

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryFeature
Issue priorityNormal
Prioritized changesThe main goal of this issue is usability, it allows the statistics module to do more out the box and removes the "why isn't this working?" question (even faced by myself sometimes when setting up a new dev environment).

dropbutton text fails to retain .dropbutton-widget width

$
0
0

Meta Issue:#1870944: [Meta] Mobile friendly admin pages

Problem/Motivation

- Alignment of text in action dropdown. In Narrow screens the text is partly hidden.

- dropbutton cuts off long action item, either in the button or at the edge of the window.

Reproduce:

  1. Apply bug.patch
  2. Go to admin/structure/types/manage/article/fields
  3. Trying to reduce the width of browser window

Proposed resolution

A. Comment #57: Trying to fix both issues with a JS solutions. When the buttons placed nearly at edge of the windows side. Dropdown menu expands in same positions. see image in Comment #57. Table columns retains as the smallest as possible.
B. Comment #63: The column width will change according to the longest widget. BUT when it expended, the longest menu still cut off.
C. Comment #97: Patch flying in with a pure css solution that unifies the dropbutton width to that of the longest item.

Remaining tasks

  1. Needs a CSS approach to resolve both problem and retains performance.
  2. If above is failing, reviews the performance affection of Comment #57 patch.

Viewing all 293247 articles
Browse latest View live