Account created on 23 September 2011, about 13 years ago
#

Recent comments

🇸🇪Sweden arne_hortell

Yes... the amount of rows must match, sorry...

🇸🇪Sweden arne_hortell

If you use composer and get
patch: unrecognized option `--no-backup-if-mismatch'

Read here #14 fixing

Or just remove the parameter --no-backup-if-mismatch in row 415 of
vendor/cweagans/composer-patches/src/Patches.php

// if ($patched = $this->executeCommand("patch %s --no-backup-if-mismatch -d %s < %s", $patch_level, $install_path, $filename)) {
if ($patched = $this->executeCommand("patch %s -d %s < %s", $patch_level, $install_path, $filename)) {

🇸🇪Sweden arne_hortell

The patch, to be used with composer etc

🇸🇪Sweden arne_hortell

I found the problem, issue and everything is now fine.
It has nothing to do with module SqlSrv.

🇸🇪Sweden arne_hortell

It turns put common.inc have more issues, attaching patch for this.
What happens in my case is that a schema does not have fields which makes it fail hard.
This have been undetected for ages.

🇸🇪Sweden arne_hortell

Due to desperate need to migrate a D7 site which explodes due to this issue, i provide a patch which put error in log as above.

🇸🇪Sweden arne_hortell

I have heard others saying the request should be dynamic to use the right range functionality so @cilefen, you might be just right.

🇸🇪Sweden arne_hortell

address_line3 is also used in the payout flow in two places
My quickfix is to add the field address_address_line3 in both tables but it would be nice if someone created a patch for this doing it the right way with adressfield 2.0 etc.

INSERT INTO [profile__address] ([entity_id], [revision_id], [bundle], [delta], [langcode], [address_langcode], [address_country_code], [address_administrative_area], [address_locality], [address_dependent_locality], [address_postal_code], [address_sorting_code], [address_address_line1], [address_address_line2], [address_address_line3], [address_organization], [address_given_name], [address_additional_name], [address_family_name])

INSERT INTO [profile_revision__address] ([entity_id], [revision_id], [bundle], [delta], [langcode], [address_langcode], [address_country_code], [address_administrative_area], [address_locality], [address_dependent_locality], [address_postal_code], [address_sorting_code], [address_address_line1], [address_address_line2], [address_address_line3], [address_organization], [address_given_name], [address_additional_name], [address_family_name])

🇸🇪Sweden arne_hortell

address__address_line3

Is missed when creating a store, the SQL asks for it, but its not in the database.
When manually adding the field, the SQL works.

POST /en/store/add/online HTTP/1.1" 500 585 "http://SERVER/en/store/add/online

Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "SQLSTATE[42S22]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Invalid column name 'address__address_line3'.: INSERT INTO [commerce_store_field_data] ([store_id], [type], [langcode], [uid], [name], [mail], [default_currency], [timezone], [address__langcode], [address__country_code], [address__administrative_area], [address__locality], [address__dependent_locality], [address__postal_code], [address__sorting_code], [address__address_line1], [address__address_line2], [address__address_line3], [address__organization], [address__given_name], [address__additional_name], [address__family_name], [is_default], [created], [changed], [default_langcode], [prices_include_tax]) OUTPUT (1) VALUES \n(:db_insert0, :db_insert1, :db_insert2, :db_insert3, :db_insert4, :db_insert5, :db_insert6, :db_insert7, :db_insert8, :db_insert9, :db_insert10, :db_insert11, :db_insert12, :db_insert13, :db_insert14, :db_insert15, :db_insert16, :db_insert17, :db_insert18, :db_insert19, :db_insert20, :db_insert21, :db_insert22, :db_insert23, :db_insert24, :db_insert25, :db_insert26)

🇸🇪Sweden arne_hortell

My problem now is this

{
"alfa": "one",
"beta": "two"
}

What in the world should the apath be???
In my world, nothing, as its a single answer but i cant enter "nothing", its required something.

🇸🇪Sweden arne_hortell

The reason and solution is not related to externalauth at all but i relate it here for future knowledge

https://www.drupal.org/project/drupal/issues/3380807#comment-15189980 🐛 statementwrapper have no range Postponed: needs info

🇸🇪Sweden arne_hortell

tonight i uninstalled external auth and still got same result.
So problem might not be in externalauth.

🇸🇪Sweden arne_hortell

Solution is to upgrade to D9.5.10

D9.5.8 have partly updated some of the laminas repos so therefore patches aboce does not work, the do partly, but not all the way.
D9.5.10 Works perfectly.

🇸🇪Sweden arne_hortell

Neither of patches above applies for D9.5.8, any idea of solution?

🇸🇪Sweden arne_hortell

This is a longshot...

For me i have content types which have droplists that show selectable entity relations to other nodes.
After i activated the above modules, i also migrated these selectable nodes and i think it might started to work after that.

It might, just might be that if a node form, have a entity reference selectable field and there is no items selectable in that, it might
fail silently and as such prohibit the conditional fields to work as all fields are "Not in good shape", if you understands me?
As said, its a longshot.

🇸🇪Sweden arne_hortell

What if you run cron and clear cache?

drush core:cron
drush cr

🇸🇪Sweden arne_hortell

For me it turned out that some jquery functions had to be enabled in modules, after enabling these, it works
JQuery Draggable
JQuery Droppable

🇸🇪Sweden arne_hortell

The patch does not work for 4.0.alpha3 or dev.
I cant migrate the conditional settings in my D9.5.8 version from my D7.98
Any ideas for solution?

🇸🇪Sweden arne_hortell

The adress 2.0 fix is not into the latest release of 2.x.dev

🇸🇪Sweden arne_hortell

Here is a patch which adds date and numeric field type

🇸🇪Sweden arne_hortell

In core/modules/rest/src/Plugin/views/display/RestExport.php function collectRoutes

find the line
$formats = $style_plugin->getFormats();

replace with
$formats=false;
if (method_exists($style_plugin,'getFormats'))
$formats = $style_plugin->getFormats();

🇸🇪Sweden arne_hortell

In core/modules/rest/src/Plugin/views/display/RestExport.php function collectRoutes

find the line
$formats = $style_plugin->getFormats();

replace with
$formats=false;
if (method_exists($style_plugin,'getFormats'))
$formats = $style_plugin->getFormats();

🇸🇪Sweden arne_hortell

In core/modules/rest/src/Plugin/views/display/RestExport.php function collectRoutes

find the line
$formats = $style_plugin->getFormats();

replace with
$formats=false;
if (method_exists($style_plugin,'getFormats'))
$formats = $style_plugin->getFormats();

🇸🇪Sweden arne_hortell

Hi,

First of all, might be a stupid question, but under advanced,->Query settings have you entered your url to site1 there?

Now to the apath...
In your case, i think you should use [
I have the same json structure as you and it works fine with [

the / is for when you have a single item as result and not a list/array which [ stands for.
Hope something gets better for you.

🇸🇪Sweden arne_hortell

Yes @dcam, there was no such database.

🇸🇪Sweden arne_hortell

Does anyone know how to get smtp working of outlook.office365.com ?
I run D9.5.x

🇸🇪Sweden arne_hortell

Turns out configs where stored in database, somehow so when i restarted everything problem solved itself

🇸🇪Sweden arne_hortell

arne_hortell made their first commit to this issue’s fork.

🇸🇪Sweden arne_hortell

This patch work with composer and auto patching like this

"extra": {
"enable-patching": true,
"patches": {
"drupal/core": {
"Undefined title":" https://www.drupal.org/files/issues/2023-06-19/undefined-key-title-33664... "

🇸🇪Sweden arne_hortell

Here is my situation

Argument #3 ($bt) must be of type string, null given, called in modules/contrib/views_migration/src/Plugin/migrate/source/d7/ViewsMigration.php on line 238 in modules/contrib/views_migration/src/Plugin/migrate/source/d7/ViewsMigration.php on line 256 #0 modules/contrib/views_migration/src/Plugin/migrate/source/d7/ViewsMigration.php(238): Drupal\views_migration\Plugin\migrate\source\d7\ViewsMigration->convertFieldFormatters(Array, 'file', NULL)
#1 core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php(419): Drupal\views_migration\Plugin\migrate\source\d7\ViewsMigration->prepareRow(Object(Drupal\migrate\Row))
#2 [internal function]: Drupal\migrate\Plugin\migrate\source\SourcePluginBase->next()
#3 core/modules/migrate/src/MigrateExecutable.php(292): FilterIterator->next()
#4 /vendor/drush/drush/includes/drush.inc(122): Drupal\migrate\MigrateExecutable->import()
#5 vendor/drush/drush/includes/drush.inc(113): drush_call_user_func_array(Array, Array)
#6 modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(953): drush_op(Array)
#7 modules/contrib/migrate_tools/src/Commands/MigrateToolsCommands.php(413): Drupal\migrate_tools\Commands\MigrateToolsCommands->executeMigration(Object(Drupal\migrate\Plugin\Migration), 'upgrade_d7_view...', Array)
#8 [internal function]: Drupal\migrate_tools\Commands\MigrateToolsCommands->import('upgrade_d7_view...', Array)
#9 vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
#10 vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#11 vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#12 vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#13 vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 vendor/drush/drush/drush.php(77): Drush\Runtime\Runtime->run(Array)
#20 vendor/drush/drush/drush(4): require('/var/www/fleet....')
#21 {main}
TypeError: Drupal\views_migration\Plugin\migrate\source\d7\ViewsMigration::convertFieldFormatters(): Argument #3 ($bt) must be of type string, null given, called in modules/contrib/views_migration/src/Plugin/migrate/source/d7/ViewsMigration.php on line 238 in Drupal\views_migration\Plugin\migrate\source\d7\ViewsMigration->convertFieldFormatters() (line 256 of modules/contrib/views_migration/src/Plugin/migrate/source/d7/ViewsMigration.php).

🇸🇪Sweden arne_hortell

Please, can a patch be created?
To use it is optional but i think i need it.

🇸🇪Sweden arne_hortell

Its very hard to reproduce as it comes from a migration from a site where title field is replaced by a separate title so occationally
the title field can actually be empty, therefore best solution is to make a bugfix for this so its fixed for future.

🇸🇪Sweden arne_hortell

It turned out there was another issue, totally unrelated that made the #15.
Now all is fine and im looking forward to you r new release @pstewart

🇸🇪Sweden arne_hortell

My patch

diff --git a/content_access.module b/content_access.module
index e507418..9c16db8 100644
--- a/content_access.module
+++ b/content_access.module
@@ -172,7 +172,7 @@ function content_access_entity_insert(EntityInterface $entity) {
   $config = \Drupal::configFactory()->getEditable('content_access.settings');
 
   if ($entity instanceof RoleInterface) {
-    $roles_gids = array_flip($config->get('content_access_roles_gids'));
+    $roles_gids = array_flip((array)$config->get('content_access_roles_gids'));
     $roles_gids[] = $entity->id();
     $config->set('content_access_roles_gids', array_flip($roles_gids));
     $config->save();
🇸🇪Sweden arne_hortell

It turned out that website works great but drush is totally handicapped and cant connect to database.
Everything worked on friday...
Any ideas?

🇸🇪Sweden arne_hortell

About 15 hours ago my development site failed to connect to database, i had dev-4.3-x 4288276 which have been working flawlessly a few weeks. After upgrading to dev-4.4-x 3362d7f it works perfectly again.
Thanks pstewart for your efforts.

🇸🇪Sweden arne_hortell

composer require 'drupal/conditional_fields:4.x-dev@dev' --no-interaction

🇸🇪Sweden arne_hortell

So in my .module file i should NOT use namespace, but only use for the classes i defined in src/ClassName[s].php ?
In these ClassName.php it should NOT use namespace at all.

Is that correct?

If so, i still get "Classes must be PSR-4 compliant." from drush dmu-analyze MODULENAME

I also tried using

namespace Drupal\modulename;

In all classfiles but that gives same result.

🇸🇪Sweden arne_hortell

it turned out that
1. i had to remove composer.lock
2. run composer self-update
3. run composer update
4. set settings.php as you said with
trust_server_certificate=1
5. then do a db install with drush
6. then go to site and wait forever

🇸🇪Sweden arne_hortell

it turned out that
1. i had to remove composer.lock
2. run composer self-update
this because composer had problems with symphony

3. run composer update
4. set settings.php as you said with
trust_server_certificate=1
5. then do a db install with drush
6. then go to site and wait forever

🇸🇪Sweden arne_hortell

Im trying out ODBC now and from ubuntu cli its possible to connect to database but fron drupal it doesnt work.
/opt/mssql-tools18/bin/sqlcmd -S DSNNAME -D -U theUserName -PpAssW0rd

Any idea how to get D10 to install in this?

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => $database,
'username' => $username,
'password' => $password,
'host' => $host,
'port' => 1433,
'driver' => 'odbc',
'odbc_driver' => 'ODBC Driver 18 for SQL Server',
),
),
);

And my odbc.ini, [DEFAULT]=dsnname
------------------------------------------------------
[DEFAULT]
Driver = ODBC Driver 18 for SQL Server
Server = SERVER.IP.NUMBER
Port = 1433
User = dbuser
Password = dbpassword
Database = dbname
Encrypt = yes
TrustServerCertificate = yes

🇸🇪Sweden arne_hortell

In composer.json add the following if install should be on mssql with D10

"scripts": {
"post-autoload-dump": [
"echo '***************** download sqlsrv 4.3.1 ***************'",
"wget https://ftp.drupal.org/files/projects/sqlsrv-4.3.1.tar.gz; tar -zxvf sqlsrv-4.3.1.tar.gz; mv sqlsrv web/modules/contrib/"
]
}

🇸🇪Sweden arne_hortell

You can not install using composer require 'drupal/sqlsrv:^4.3'
You must in your composer file, set to download to folder
WEBROOT/modules/contrib/sqlsrv
Then it might work

Production build 0.71.5 2024