Problem/Motivation
See #1037.
See #1037.
Recommendations:
Change to an up/down icon when four-way movement isn't possible.
Add a border to indicate draggable items are activated on mouseover.
Basically, if you're using CKEditor with styles dropdown and "limit allowed HTML tags", automatic "allowed tags" updating can really trip you up.
Steps to reproduce:
p.test|Test
<p class>
Based on the text editor configuration, these tags have automatically been added: <p class=" test">
.
<p class=" test">
This is unnecessary because <p class>
allowed for class='test'
, but is worse because now only the test class is allowed. Of course, you can change this before you save, but you'll have to do it every time you edit the configuration.
If FieldPluginBase::trimText() has the values of max length 4 and with the ellipsis setting set to True... and it trims a value like 'admin' it returns admi… which is length 5 and not trimmed at all :)
As detected by #2484693: Telephone Link field formatter InvalidArgumentException with 5 digits or fewer in the number, PHP does not guarantee the parse_url
function results for URIs.
The problem is that PHP's parse_url is 'designed' for url's not for URIs.
Because by documentation parse_url:
This function is intended specifically for the purpose of parsing URLs and not URIs.
That can lead to many issues as this function is widely used in the Core as shown in the following table:
The ones which work:
File/Class | Function/Method | Result |
---|---|---|
core/includes/batch.inc | _batch_finished | OK |
core/includes/install.core.inc | install_check_translations | OK |
core/includes/install.core.inc | install_retrieve_file | OK |
\Drupal\Component\Utility\UrlHelper | externalIsLocal | OK |
\Drupal\Component\Utility\UrlHelper | parse | OK |
\Drupal\Core\DrupalKernel | initializeRequestGlobals | OK |
\Drupal\Core\Database\Database | convertDbUrlToConnectionInfo | OK |
\Drupal\Core\Utility\UnroutedUrlAssembler | assemble | OK |
\Drupal\language\Form\NegotiationUrlForm | validateForm | OK |
\Drupal\language\Plugin \LanguageNegotiation\LanguageNegotiationUrl | getLangcode | OK |
\Drupal\language\Tests \LanguageUILanguageNegotiationTest | testLanguageDomain | OK |
\Drupal\language\Tests\LanguageUrlRewritingTest | testDomainNameNegotiationPort | OK |
\Drupal\link\Plugin\Field\FieldWidget\LinkWidget | getUriAsDisplayableString | OK |
\Drupal\menu_link_content\Entity\MenuLinkContent | preSave | OK |
\Drupal\node\Tests\PagePreviewTest | testPagePreview | OK |
\Drupal\search\Tests\SearchLanguageTest | testLanguages | OK |
\Drupal\simpletest\BrowserTestBase | getAbsoluteUrl | OK |
\Drupal\simpletest\BrowserTestBase | setUp | OK |
\Drupal\simpletest\WebTestBase | getAbsoluteUrl | OK |
\Drupal\system\Tests\Form\RebuildTest | testPreserveFormActionAfterAJAX | OK |
\Drupal\system\Tests\Pager\PagerTest | testActiveClass | OK |
\Drupal\system\Tests\Pager\PagerTest | testPagerQueryParametersAndCacheContext | OK |
core/modules/update/update.manager.inc | update_manager_file_get | OK |
\Drupal\views\Plugin\views\display\PathPluginBase | validatePath | OK |
\Drupal\views\Plugin\views\field\FieldPluginBase | renderAsLink | OK |
\Drupal\views_ui\ViewEditForm | getDisplayDetails | OK |
Not OK:
\Drupal\Core\Url | fromUri | Not OK (see the issue summary) |
\Drupal\Core\Validation\Plugin\Validation \Constraint\PrimitiveTypeConstraintValidator | validate | Not OK |
\Drupal\link\Plugin\Field\FieldWidget\LinkWidget | getUserEnteredStringAsUri | Not OK (it transforms tel:xxx to internal:tel:xxx) |
\Drupal\link\Plugin\Field\FieldWidget\LinkWidget | validateUriElement | Not OK (partly because of getUserEnteredStringAsUri) |
\Drupal\link\Plugin\Validation \Constraint\LinkExternalProtocolsConstraintValidator | validate | Not OK (for both tel:911 [error], tel:65536 [error] and tel:0123456789 [failure]) |
\Drupal\menu_link_content \Plugin\migrate\process\d6\InternalUri | transform | Not OK (converts the tel:xxx URL to internal:/tel:xxx) |
\Drupal\shortcut\Controller \ShortcutSetController | addShortcutLinkInline | Not OK (converts the tel:xxx URL to internal:/tel:xxx but it's not likely to happens in shortcuts) |
core/modules/system/system.module | system_retrieve_file | Can throw notices but not likely to be used with a tel URI |
We have Drupal\Component\Utility\UrlHelper (URL). We should create a similar UrIHelper (URI) class which is a true RFC 3986 parser.
Note: An external parser can't be used with our current Drupal requirements (PHP 5.6+ or php-intl requirements, both which Drupal doesn't have now)
Wrap parse_url
in a drupal_parse_uri
function so we can manage all specific cases and unit test it.
Discuss, Fix PHP, Fix Drupal, Enjoy
None.
An added URIHelper class.
None.
In the DrupalWebTestCase->prepareEnvironment()
there are more dynamic properties, which in PHP 8.2 results in these deprecation messages:
Deprecated function: Creation of dynamic property $originalLanguage is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1417 of /modules/simpletest/drupal_web_test_case.php)
Deprecated function: Creation of dynamic property $originalLanguageUrl is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1418 of /modules/simpletest/drupal_web_test_case.php)
Deprecated function: Creation of dynamic property $originalLanguageDefault is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1419 of /modules/simpletest/drupal_web_test_case.php)
Deprecated function: Creation of dynamic property $originalProfile is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1422 of /modules/simpletest/drupal_web_test_case.php)
Deprecated function: Creation of dynamic property $originalCleanUrl is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1423 of /modules/simpletest/drupal_web_test_case.php)
Deprecated function: Creation of dynamic property $public_files_directory is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1442 of /modules/simpletest/drupal_web_test_case.php)
Deprecated function: Creation of dynamic property $private_files_directory is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1443 of /modules/simpletest/drupal_web_test_case.php)
Deprecated function: Creation of dynamic property $temp_files_directory is deprecated in DrupalWebTestCase->prepareEnvironment() (line 1444 of /modules/simpletest/drupal_web_test_case.php)
Run simpletest on PHP 8.2.
Add these missing properties to the DrupalWebTestCase
class.
We are creating dynamic properties on PDOException
class here:
Deprecated function: Creation of dynamic property PDOException::$query_string is deprecated in DatabaseConnection->query() (line 770 of /includes/database/database.inc).
Deprecated function: Creation of dynamic property PDOException::$args is deprecated in DatabaseConnection->query() (line 772 of /includes/database/database.inc).
Run simpletest on PHP 8.2.
The $condition
property is created dynamically in MergeQuery
class:
Deprecated function: Creation of dynamic property MergeQuery::$condition is deprecated in MergeQuery->__construct() (line 1357 of /includes/database/query.inc).
Run simpletest on PHP 8.2
Add the property.
Using Drupal\Core\Archiver\Zip
to initialize a zip object from a file path, I'm receiving a ArchiverException Cannot open %file_path
, returned error by ZipArchive ZIP_ER_OPEN - 11
I was able to reproduce the issue with:
Ubuntu 14.04
PHP 5.6.23
ZIP lib 1.12.5
Passing a \ZipArchive::CREATE
flag to ZipArchive open() method, fixed the problem, but Drupal\Core\Archiver\Zip
doesn't allow to pass any additional arguments to constructor.
To add a second optional $flags argument in Drupal\Core\Archiver\Zip __constructor()
and pass by default \ZipArchive::CREATE
(create the archive if not exists) flag.
We are creating dynamic property $stringVersion
in the DatabaseCondition
class:
Deprecated function: Creation of dynamic property DatabaseCondition::$stringVersion is deprecated in DatabaseCondition->compile() (line 1887 of /includes/database/query.inc).
Run simpletest on PHP 8.2
Add the property.
We are creating dynamic properties in the SelectQuery
class:
Deprecated function: Creation of dynamic property SelectQuery::$alterTags is deprecated in SelectQuery->addTag() (line 978 of /includes/database/select.inc).
Deprecated function: Creation of dynamic property SelectQuery::$alterMetaData is deprecated in SelectQuery->addMetaData() (line 997 of /includes/database/select.inc).
Run simpletest on PHP 8.2.
Add the properties.
The property should be defined for class on PHP 8.2, see #3275851: [META] Fix PHP 8.2 dynamic property deprecations
there's // @todo: Pass $violation->arrayPropertyPath as property path.
found later in code from #1969728: Implement Field API "field types" as TypedData Plugins
Usage is small enough to replace it with proper method of current API
There's 26 usages in contrib http://codcontrib.hank.vps-private.net/search?text=arrayPropertyPath
$ git grep arrayPropertyPath
core/lib/Drupal/Core/Field/WidgetBase.php:452: $violation->arrayPropertyPath = $property_path;
core/lib/Drupal/Core/Field/WidgetBase.php:468: // @todo: Pass $violation->arrayPropertyPath as property path.
core/modules/text/src/Plugin/Field/FieldWidget/TextareaWidget.php:49: if ($violation->arrayPropertyPath == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php:103: return ($element === FALSE) ? FALSE : $element[$violation->arrayPropertyPath[0]];
core/modules/text/src/Plugin/Field/FieldWidget/TextfieldWidget.php:40: if ($violation->arrayPropertyPath == ['format'] && isset($element['format']['#access']) && !$element['format']['#access']) {
Drupal\Tests\field_ui\Functional\ManageFieldsFunctionalTest::testDefaultValue
Exception: Deprecated function: Creation of dynamic property Symfony\Component\Validator\ConstraintViolation::$arrayPropertyPath is deprecated
Drupal\Core\Field\WidgetBase->flagErrors()() (Line: 452)
Could be extended with other options
1) Add a method to \Drupal\Core\Entity\EntityConstraintViolationList
2) finish todo at form-api level
- decide solution
- add test
- patch/commit
no
TBD
no
no
Emails using MailManager::mail which don't include message id are failing (message ID is optional, even after adding message ID it still fails).
I have custom module that sends emails using MailManager::mail (Drupal::service('plugin.manager.mail').
After upgrading to Drupal core to 9.4.5, i noticed it included https://github.com/egulias/EmailValidator (3.2.x). That latest update in egulias included the below validation which is new addition for the 3.2.xx.
MessageIDValidation: Follows RFC2822 for message-id to validate that field, that has some differences in the domain part. https://github.com/egulias/EmailValidator
.
Error:PHP Fatal error: Declaration of Egulias\EmailValidator\Validation\MessageIDValidation::isValid(string $email, Egulias\EmailValidator\EmailLexer $emailLexer): bool must be compatible with Egulias\EmailValidator\Validation\EmailValidation::isValid($email, Egulias\EmailValidator\EmailLexer $emailLexer) in <drupal root>/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php on line 23
If i delete the below file , email gets sent ok and works. But there are warnings in the logs for deleted file. Also, documented below
https://www.webtrees.net/index.php/en/forum/help-for-2-0/36616-email-err...
Deleting below file works.
/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php
https://github.com/egulias/EmailValidator/blob/3.x/src/Validation/Messag...
install or update to Drupal core 9.4.5.
Try to use MailManager::mail to send an email (I'm using custom module).
Message won't be received.
Check your php error logs
Downgrade egulias/EmailValidator to a version that doesn't include the MessageIDValidation validation such as:
https://github.com/egulias/EmailValidator/tree/3.0.1
Currently the system uses either: PECL uploadprogress http://pecl.php.net/package/uploadprogress or APC rfc1867 to show file upload progress (neither of which work with PHP 7 and nginx).
There was a discussion here https://www.drupal.org/node/1561866 about using the built in php session upload progress (PHP 5.4+) however Drupal's implementation of PHP session seems to interfere with this in a lot of cases.
https://www.drupal.org/u/droplet suggested that as D8 uses the jQuery.form plugin, it's proposed that we remove the reliance on 3rd party PHP libraries in the built in session upload progress and go with a the jQuery.form client side solution.
I have attached a patch that implements this and removes the old solutions.
It definitely needs review and some additional work (I would like this to work with remote file systems and CORS upload eventually).
Tested with Apache2 and nginx in Chrome (latest version).
I suspect there may be issues with Internet Explorer 9 compatibility. Does anyone know if there is a fallback built into jQuery.form to handle this?
#3222947: Decide whether to move Quick Edit to contrib Is leaning towards "yes, let's remove it."
This is the issue to remove the Quick Edit Module in 10.0.x
.
The issue for deprecating the Quick Edit Module in 9.5.x
can be found here: #3270434: Mark Quick Edit deprecated in 9.5.x core
n/a
Try to remove Quick Edit and see what happens.
Fix any problems that may rear ugly heads.
Nothing (but that can change very quickly...)
#3291700: new subtree split of core Quick Edit into contrib (v2)
Manual testing: An excellent example of the manual testing that happened on the Color module can be found here #3302799: Manually test color module removal and might/can/should be inspirational.
Note
This MR (against 10.0.x
) needs:
- the fixture changes updated
- a separate patch against 10.1.x
.
Since fixture changes are tedious work and there are a lot of those floating around in several other issues that are close to being committed, I (=Spokje) have given up on updating the MR until the dust settles a bit and I can do the update in one go.
By the time this issue is actually not being postponed any more it should be quick and easy enough (#FamousLastWords) to create the 10.1.x
-patch by me or basically anybody.
The fixture update is a bit more elaborate, but I strongly believe that I since I've figured it out, so can anybody.
If anybody feels inclined to keep the MR up-to-date whilst this issue is still postponed: Please be my guest :)
The current state of the MR should be fine for both issues that this one is postponed on, since the changes that need to be made are only for automated tests outside the quickedit module itself (so OK for a new subsplit) and since its about automated tests, it doesn't interfere with the actual functionality of the module itself, so manual testing should be fine.
If not: Ping me or, preferably, do a reroll yourself :)
Refer to the tracking issue for removing Quick Edit #3274155: [Meta] Tasks to remove Quick Edit from core and move to contrib
QuickEdit has been removed from core. You should add a dependency on the contributed QuickEdit module if you want to keep using this functionality. For more information, see the recommendations for handling deprecated core modules and themes.
Hi there,
I ran into an 'issue' today that gave me a "that can't be right" feeling. I know starting a module name with numeric characters is bad practice since a valid function name starts with a letter or underscore. I don't see why this should also be the case for a package name as this is (as far as my knowledge goes) only used for administrative purposes. I also know that this key should be used for grouping related modules together. In real-life i have encountered multiple projects where the package key was used to group all custom modules for a customer and the customer name was used as it's value.
As we are using Yaml files in D8 there is a difference in the usage of 007 or '007' and the second notation should not lead to any issues.
Steps to reproduce:
1. Create a custom module and set package key to '007'
2. Visit the "admin/modules" page (enabling the module is not needed)
3. See a WSOD or Error message depending on your error level
InvalidArgumentException: $string ("007") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct()
I haven't had the chance to dig deep into the code but as far is i can see now the string value from the Yaml file is presented to TranslatableMarkup->construct() as an integer, thus failing the is_string() check.
- Add 007 as the package in a test module (see system/tests/modules for many to chose from)- Re-roll the patch
- Upload the test only version of the patch (with just the changes to the test module info file)
- Upload a test + patch version
- Needs review
Issue so I can crash test patches before they clog up an issue.
There's a @todo in the docblock of seven_preprocess_fieldset__media_library_widget
that says:
@todo Remove this when https://www.drupal.org/project/drupal/issues/2999549 lands.
There's also todo in Drupal\media_library\Plugin\Field\FieldWidget\MediaLibraryWidget
that says:
@todo Use a link here, and delete seven_preprocess_fieldset__media_library_widget(), when https://www.drupal.org/project/drupal/issues/2999549 lands.
Address the todo comments.
When doing a site clean install for some reason there's several of tens files that can't be imported in that time and I receiving the following messages (this is just few of them):
[notice] Missing required data for configuration: purge.logger_channels
[notice] Missing required data for configuration: purge.plugins
[notice] Missing required data for configuration: core.entity_form_mode.paragraph.date
[notice] Missing required data for configuration: facets.facet.content_type
[notice] Missing required data for configuration: field.field.user.user.field_picture
[notice] Missing required data for configuration: flag.flag.follow
[notice] Missing required data for configuration: language.entity.bg
[notice] Missing required data for configuration: pathauto.pattern.group_content
[notice] Missing required data for configuration: views.view.watchdog
[notice] Missing required data for configuration: views.view.who_s_new
[notice] Missing required data for configuration: views.view.who_s_online
While debugging I found that it comes from here the message: core/lib/Drupal/Core/Config/StorageCopyTrait.php from the replaceStorageContents function. Further checking this I've found that in the core/lib/Drupal/Core/Config/CachedStorage.php file the following code segment
public function read($name) {
$cache_key = $this->getCacheKey($name);
if ($cache = $this->cache->get($cache_key)) {
// The cache contains either the cached configuration data or FALSE
// if the configuration file does not exist.
return $cache->data;
}
// Read from the storage on a cache miss and cache the data. Also cache
// information about missing configuration objects.
$data = $this->storage->read($name);
$this->cache->set($cache_key, $data);
return $data;
}
is being executed, where the cache returns an object, but the data in the object is empty. While if I run in that time the $this->storage->read($name); I get back the file contents actually.
Unsure if it's reproducible on other installations, yet. But it should be something like this:
1. Have an already working site.
2. Try to do a clean install from config.
3. While it does the install from config I receive these messages and the configs are not installed or imported, and sometimes I can't do it even after the install as its shows like everything is imported. While enabling another module suddenly changes something and I can import the rest of the configs without an issue.
drush cr does not solve the issue, drush en and some module does...
On clean install, it should read the files instead of some cached values.
n/a
n/a
n/a
n/a
n/a