Account created on 1 August 2007, almost 17 years ago
#

Merge Requests

Recent comments

🇩🇪Germany vistree

Hi, may I come back to this issue? If I add a charts field to one of my content types, I can already select "Highmap" as charting library. But then it does not work anymore and I find some errors in the browser console:

jquery.min.js?v=3.7.1:2 
 POST http://mysite.local/de/node/6328/edit?destination=/de/admin/content&ajax_form=1&_wrapper_format=drupal_ajax&_wrapper_format=drupal_ajax 500 (500 Service unavailable (with message))
send	@	jquery.min.js?v=3.7.1:2
ajax	@	jquery.min.js?v=3.7.1:2
q.fn.ajaxSubmit	@	jquery.form.js:341
Drupal.Ajax.eventResponse	@	ajax.js?v=10.2.4:796
(anonymous)	@	ajax.js?v=10.2.4:646
dispatch	@	jquery.min.js?v=3.7.1:2
v.handle	@	jquery.min.js?v=3.7.1:2
handleMouseUp_	@	unknown
ajax.js?v=10.2.4:1219 Uncaught 
Drupal.AjaxError {message: '\nEin AJAX-HTTP-Fehler ist aufgetreten.\nHTTP-Rückga…encountered an unexpected error. Try again later.', name: 'AjaxError', stack: 'Error\n    at http://mysite.local/core/misc/ajax.js?v=…ttp://mysite.local/core/misc/ajax.js?v=10.2.4:1916:3'}
message
: 
"\nEin AJAX-HTTP-Fehler ist aufgetreten.\nHTTP-Rückgabe-Code: 500\nIm Folgenden finden Sie Debugging-Informationen.\nPfad: /de/node/6328/edit?destination=/de/admin/content&ajax_form=1&_wrapper_format=drupal_ajax\nStatustext: 500 Service unavailable (with message)\nAntworttext: The website encountered an unexpected error. Try again later."
name
: 
"AjaxError"
stack
: 
"Error\n    at http://mysite.local/core/misc/ajax.js?v=10.2.4:196:32\n    at http://mysite.local/core/misc/ajax.js?v=10.2.4:1916:3"
[[Prototype]]
: 
Error at http://mysite.local/core/misc/ajax.js?v=10.2.4:196:32 at http://mysite.local/core/misc/ajax.js?v=10.2.4:1916:3
Drupal.Ajax.error	@	ajax.js?v=10.2.4:1219
complete	@	ajax.js?v=10.2.4:608
M.complete.M.complete	@	jquery.form.js:302
c	@	jquery.min.js?v=3.7.1:2
fireWith	@	jquery.min.js?v=3.7.1:2
l	@	jquery.min.js?v=3.7.1:2
(anonymous)	@	jquery.min.js?v=3.7.1:2
load (async)		
send	@	jquery.min.js?v=3.7.1:2
ajax	@	jquery.min.js?v=3.7.1:2
q.fn.ajaxSubmit	@	jquery.form.js:341
Drupal.Ajax.eventResponse	@	ajax.js?v=10.2.4:796
(anonymous)	@	ajax.js?v=10.2.4:646
dispatch	@	jquery.min.js?v=3.7.1:2
v.handle	@	jquery.min.js?v=3.7.1:2
handleMouseUp_	@	unknown
🇩🇪Germany vistree

Hi @andileco,
Thanx for producing the video tutorial. This is perfectly helpful and I now understand how to use this module.
Just 3 additional questions:
1. can I use both, highmaps and highchart library in one Drupal page? Do I really need ti change the library on charts config page to highmaps to make the views type work?
2. As JSON source, can I use everything from https://code.highcharts.com/mapdata/ ?
3 is it possible to use Tiled Web Maps (https://www.highcharts.com/docs/maps/tiledwebmap)?

Thank you so much for your great support !

🇩🇪Germany vistree

Hi, I really tried hard to get this module run. But, I am lost ... Any documentation about how to set this up (taxonomy, how to add map source, how to add geolocation to content types, ...) would be really helpful!

🇩🇪Germany vistree

After some debugging I found out that the error is not related to the single_content_sync module - instead it had to do with the charts structure. I fixed that and now I can export the chart_config by just adding the field name to

/modules/contrib/single_content_sync/src/Plugin/Derivative/SingleContentSyncFieldProcessor/SimpleFieldDeriver.php

🇩🇪Germany vistree

Hi, the solution from @jim.shreds does not work for me. I tried:

/**
 * Implements hook_preprocess_page().
 */
function ditrare_preprocess_page(&$variables) {
  $variables['#attached']['drupalSettings']['responsive_menu']['custom'] = [
    'options' => [
      'navbar' => [
        'add' => TRUE,
        'title' => 'This is a test',
      ],
      "offCanvas" => [
        "position"=> "left",
      ]
    ],
    'config' => [
      'classNames' => [
        'selected' => 'my-custom-menu--active-trail',
      ],
    ]
  ];
}

What I really want is to use the mmenu option left-front or right-front - so that the offcanvas is overlaying the content instead of moving the content from the side to make space for the offcanvas menu.

Should the "offCanvas" option work within theme-page-hook? + Should the position: right-front work?

🇩🇪Germany vistree

Thanx @tank,
Then it is as expectected. I thought that there could be an option within gui or alter hook

🇩🇪Germany vistree

Using about:blank results in console errors on Chrome. Using a valid placeholder (link in patch from #8) will make sure that there is no HTML error and no Chrome console error.
I think this issue should be reopened and the solution from #8 should be proved.

🇩🇪Germany vistree

Thanx @Grevil and @Anybody,
my MR now was build successfully.

🇩🇪Germany vistree

@Anybody: can you have look at the MR? Errors seem not to be related to my changes …

🇩🇪Germany vistree

To be honest ... I even did not realize, that the smaller text is there and can do what I was missing ;-)
So, yes. You are right ;-) We should make the "Video only" accept link a button and make the "Accept all cookies" less prominent - or we can also remove it??
What do you think?
I can then try to create a MR ;-)

🇩🇪Germany vistree

@Anybody - sure: on the attached screenshot you find the standard video filter overlay (cookies-filter-overlay-button.png). The button "Accept all Cookies" will trigger all cookis from all "groups".
So, it is the same behaviour as in the main cookies dialog (cookies-main-dialog.png)
From my point of view it should instead only set the cookie for the "video" group (cookie-video-dialog.png)

🇩🇪Germany vistree

Can one of the maintainers please explain, if the "Alle zulassen" / "Accept All" is really what we want to display as button overlay to filtered content?
What do others think? Should we "accept all" cookies with this button or should we only accept the video related cookie settings?

🇩🇪Germany vistree

I updated the patch from #161 to work with Drupal 10.2.3. Only one small change within core/modules/jsonapi/tests/src/Functional/NodeTest.php

🇩🇪Germany vistree

By the way: I am also interested in a Drupal 7 compatible patch. Is someone already working on this?

🇩🇪Germany vistree

The patch also works fine on my sites. I installed it on one page with > 1000 spams per day - and the spams have gone while wanted webform submissions still arrive.

🇩🇪Germany vistree

Thanx @drubb, that helps and solves my needs ;-)

🇩🇪Germany vistree

Hi, can patch from #10 been merged + a new D10 compatible version been created?

🇩🇪Germany vistree

Can someone explain why the D10 compatibility patch is not merged? Are there outstanding problems?

🇩🇪Germany vistree

No activity here. I think I will remove the module and look for a different one.

🇩🇪Germany vistree

This is still a problem - also in Drupal 10. Any update on how to solve this issue?

🇩🇪Germany vistree

hi, it seems, that there is still a small outstanding issue: if the menu is translatable and the menu_item_extra fields are translated - always the source language is returnde - and not the translation

🇩🇪Germany vistree

Hi @nikathone,
can you share your solution? I also need to enable pages - on the main page and the attachment.

🇩🇪Germany vistree

Can MR from #15 be merged - or are there outstanding problems?

🇩🇪Germany vistree

I am still struggling with the migration of the multilingual field collections. Does anyone here have any advice for me?

🇩🇪Germany vistree

The patch attached should apply to 6.1.2 now.

🇩🇪Germany vistree

Sorry, I accidently pressed the "create MR" in this ticket - without even downloading the branch ;-(
What do I exactly need to do? In the branch I can't find any of the patches shown in my project. I guess, they are created by the alma script when installing the local Drupal 9 site and starting the initial migration.
Can I add the patch as normal to the composer.json within the root folder of the branch?

🇩🇪Germany vistree

Hi Vlad,
thanx again ;-) My question was more about existing migration ymls after creating the initial D7 to D10 migration files.
E.g. for my D7 field-collection field_collection_education I find
1. migrate_plus.migration.upgrade_d7_field_collection_education.yml
2. migrate_plus.migration.upgrade_d7_field_collection_revisions_education.yml

From your information in #7 I now edited file from 1. -> migrate_plus.migration.upgrade_d7_field_collection_education.yml

I did all the modifications and AFTERWARDS I did a copy of that file - renamed it to
3. migrate_plus.migration.upgrade_d7_field_collection_education_trans.yml

and did the modifications described in #7

I now have 3 files!!!! And run the migration for all 3 of them.
The result seems not to be OK ;-(

Am I doing something wrong? Do I need to exclude file 2. (migrate_plus.migration.upgrade_d7_field_collection_revisions_education.yml) ?

🇩🇪Germany vistree

It seems to be a problem with paragraph migration itself. Everything on my side seems to be OK.
There is a proposed solution in https://www.drupal.org/project/paragraphs/issues/3160679 Field Collection Node content translation source plugin Needs review

As the documentation of Acquia Migrate points out that it will provide multilingual installations I thought that the migration of multilingual field_collections should work out of the box ;-)

🇩🇪Germany vistree

Hi Wim,
I don't really understand what you want me to do. It seems enough to make sure to use the latest patch from https://www.drupal.org/project/focal_point/issues/3267350 Migrate Focal Point module from D7 to D9. RTBC
Acquia Migrate adds patch from #28
I replaced it with patch from #31 - and everything works fine ;-)

The other requirements seem to be related to my special D7 source. No real need to debug that one.

🇩🇪Germany vistree

And a second question: do we need to also touch the revisions migration files?
E.g. I have
- migrate_plus.migration.upgrade_d7_field_collection_education.yml
- migrate_plus.migration.upgrade_d7_field_collection_revisions_education.yml

+ for my migrations, the new paragraph field will have translation turned on (true). Do we need to change this or will this automatically be correctly set by the new plugins?

🇩🇪Germany vistree

Hi @vlad.dancer,
thanx for your description!!! One question: in

process:
  type:
    -
      plugin: migration_lookup
      migration: upgrade_d7_field_collection_type
      no_stub: true
      source: field_name

where does the source: field_name come from? What to use? Is it the same fieldname defined in the source section? Or should it always be static "field_name"?

🇩🇪Germany vistree

@abramm, sorry for confusing ... I tested the DEV-version mentioned in #6 and thought it was output of your MR ;-)

🇩🇪Germany vistree

Hi abramm,
thanx for your patch - works fine for me with Drupal 10 ;-)

🇩🇪Germany vistree

Hi nmangold,
thanx for your reply. I know about those classes. What I need is an idicator, if the control is on the first / last slide. But, in the meanwhile I don't work on the old project anymore.

🇩🇪Germany vistree

Hi @andileco,
your MR looks really good. From my point of view this will really good default values ;-)

🇩🇪Germany vistree

Hi @andileco,
I tested the DEV-version of the charts module and I can now create bubble charts with 3 data values.
Thanx a lot ;-)

🇩🇪Germany vistree

Thanx @codebymikey for the D10 compatible release ;-)

🇩🇪Germany vistree

Hi andileco,
thanx for your commit! What does it exactly mean regarding my question? Is it now possible to add z-values?

🇩🇪Germany vistree

Any help? Or should bubble charts be used only within charts? If that is the case, we should remove the bubble option from charts node field widget!

🇩🇪Germany vistree

@Anybody - the merge request shows "The source branch is 1 commit behind the target branch" Should I do the rebase - or is this something you should do?
If I should do - do you normally use the normal rebase option or the "rebase without pipeline" option?

🇩🇪Germany vistree

@Anybody - sure - I will do ;-) Do you want me to create it against 1.2.x-dev branch?

🇩🇪Germany vistree

Ok, after creating a fresh new diagramm and directly using scatter, that one works. Before I changed an existing diagramm from pie to scatter - and that seems not to have worked ...

🇩🇪Germany vistree

Hi, I am also interested in a stable D10 version. Any plans?

🇩🇪Germany vistree

Hi, would be great to have a D10 compatible version. Any release plans?

🇩🇪Germany vistree

Hi, I am also interested in a Drupal 10 compatible version. Any plans?

🇩🇪Germany vistree

Can we have a D10 compatible release in the meanwhile?

🇩🇪Germany vistree

Hi, we are also interested in a D10 compatible work. What is needed to finalise the version?

🇩🇪Germany vistree

Yes, a documentation / example on how to use this module would be great! Can anyone describe on how to setup content type + views to show data on a map?

🇩🇪Germany vistree

I would like to see the same feature. I recognized, that I can select the highmap library within field widget - but nothing more.

🇩🇪Germany vistree

Thanx @andileco,
I have already tried the linked module. Since the module is for views, it doesn't seem to be suitable for my use-case. I need to give my editors the ability to add multiple charts (as paragraphs) to content pages.

🇩🇪Germany vistree

Patch in #8 solves the error also on our site!

🇩🇪Germany vistree

It seems to be a bug. Because it is always the fieldname being used instead of the source value.

🇩🇪Germany vistree

@bsnodgrass,
for now I add extra infomation to a settings.domain.php within my sites/default folder. Can we now add an extra field to the GUI?

🇩🇪Germany vistree

Anybody an idea on how to use entity_generate to add NON existing files to media items?
I am in trouble with source and destination ...

🇩🇪Germany vistree

As it looks we definitely have a problem using the $dataParser->currentUrl() inside a source plugin. As a solution for myself I now use a data_parser plugin - following @hctom's comment ( https://www.drupal.org/project/migrate_plus/issues/3050274#comment-13935165 ):
1. Create a file within your custom module (mymodule/src/Plugin/migrate_plus/data_parser/CustomJson.php)
2. Add to CustomJson.php

<?php

namespace Drupal\mymodule\Plugin\migrate_plus\data_parser;

use Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json;

/**
 * Obtain JSON data for migration.
 *
 * @DataParser(
 *   id = "custom_json",
 *   title = @Translation("JSON Parser for My Module")
 * )
 */
class CustomJson extends Json {
  
  /**
   * {@inheritdoc}
   */
  protected function fetchNextRow(): void {
    parent::fetchNextRow();

    // Inject file metadata.
    if ($this->valid()) {
      $activeUrl = $this->currentUrl();
      $activeUrlParts = explode('/api/', $activeUrl);
      $activeBaseUrl = str_replace('https://', 'https://username:userpassword@', $activeUrlParts[0]);

      $this->currentItem['remote_auth_url'] = $activeBaseUrl;
      $this->currentItem['active_source_url'] = $activeUrl;
    }
  }
}

Now within your migration use:

source:
  plugin: url
  data_fetcher_plugin: http
  data_parser_plugin: omeka_json

Within the process section you will now be able to use "active_source_url" and other defined parameters.

process:
  _active_source_url: active_source_url
🇩🇪Germany vistree

I found one problem with my implementation: if there is a source change, the last item BEFORE the source change already uses the new source-URL. Seems that $dataParser->currentUrl() does not return the correct item ;-(
Any idea? I can't access the property $dataParser->activeUrl or $dataParser->urls - as those are protected properties ;-(

🇩🇪Germany vistree

I were able to solve this issue with a custom source plugin:
mymodule/src/Plugin/migrate/source/UrlWithActiveSourceUrl.php

<?php
namespace Drupal\mymodule\Plugin\migrate\source;

use Drupal\migrate_plus\Plugin\migrate\source\Url;
use Drupal\migrate\Row;

/**
* Source plugin for retrieving data via URLs and add active URL as variable.
*
* @MigrateSource(
*   id = "url_with_active_source_url"
* )
*/

class UrlWithActiveSourceUrl extends Url  {

  /**
  * {@inheritdoc}
  */
  public function prepareRow(Row $row) {
    $migration = $this->migration->getSourcePlugin();
    $dataParser = $migration->dataParserPlugin;
    $activeUrl = $dataParser->currentUrl();

    $row->setSourceProperty('active_url', $activeUrl);
    return parent::prepareRow($row);
  }
}

Now I can use in my migration config:

source:
  plugin: url_with_exhibit_url
  data_fetcher_plugin: http
  data_parser_plugin: json
  track_changes: true
  urls:
    - https://www.url1.de/data.json
    - https://www.url2.de/data.json
    - https://www.url3.de/data.json

And now within process, I can use "active_url" whereever needed (e.g.)

process:
  _active_source_url: active_url
🇩🇪Germany vistree

Ui, I think I found the solution: I need to use
0/institutions/
as item_selector ...

🇩🇪Germany vistree

@very_random_man - you saved my day!! I were able to migrate paragraphs with your method without any problems ;-)
Thanx so much!!

My paragraph (colorscheme) has 5 input fields:

  • id (unique identifiere)
  • hex
  • type
  • color (name)
  • menu (to be used within the menu)
  field_colorscheme:
    - plugin: skip_on_empty
      method: process
      source: colorscheme
    -
      plugin: sub_process
      process:
        _menu: menu
        _hex: hex
        _type: type
        _color: color
        target_id:
          plugin: entity_generate
          source: id
          entity_type: paragraph
          bundle: color_set
          value_key: field_remote_id
          bundle_key: type
          values:
            field_remote_id/0/value: id
            field_color_menu/0/value: '@_menu'
            field_color_value/0/color:  '@_hex'
            field_title/0/value:  '@_type'
            field_color_type/0/value:  '@_color'
        _revision_id_value:
          plugin: entity_value
          source: '@target_id'
          entity_type: paragraph
          field_name: revision_id
        target_revision_id: '@_revision_id_value/0/value'
🇩🇪Germany vistree

@Anybody: I have uploaded a first patch. Is that sufficient?

🇩🇪Germany vistree

Thanx again @texas-bronius for your initial comment. I think I were able to find a working solution for my "NON translatable" custom entity.
Within a custom module, I added

use \Drupal\Core\Form\FormStateInterface;

function mymodule_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  if ($form_id == 'MYCUSTOMENTITY_FORM_replicate_form') {
    $form['new_bundle'] = [
      '#type' => 'select',
      '#title' => t('Bundle Type'),
      '#default_value' => 'unuiqe',
      '#options' => ['global' => t('Global'), 'unique' => t('Unique')],
      '#description' => t('Select the target bundle type'),
      '#weight' => -1,
    ];
    array_unshift($form['actions']['submit']['#submit'], '_mymodule_replicate_form_submit');
  }
}

function _mymodule_replicate_form_submit($form, FormStateInterface $form_state) {
  $entity = $form_state->getFormObject()->getEntity();
  $bundle = $form_state->getValue("new_bundle");
  $entity ->set('bundle', $bundle);
}

Hope this is the right way of implementation ;-)

🇩🇪Germany vistree

Hi, I need exactly the same. Instead of just changing the label / title, I need the option for the editor to choose the correct bundle from my custom entity. Is this somehow possible?

🇩🇪Germany vistree

Hi SteffenR,
really nice work!! Thank you!!!
One question: we want to use deepl with glossaries in multiple project: is it somehow possible to uninstall the module without deleting the glossary on deepl backend? So, remove only in Drupal - but let it stay on deepl?

Production build 0.69.0 2024