this FieldTypeCategoryManagerInterface interface is only for Drupal 10.2+. Fixed in newest version
it does not work. Drupal needs (id) to get the entity_id
@mchamps can you check Dev version, I just add 'Z' in the end of time format
So strange that it is added in the first schema, I just check import / export field, it works fine
https://git.drupalcode.org/project/triples_field/-/blob/1.0.10/config/sc...
triples_field.settings:
type: config_object
label: 'Triple subfield'
mapping:
fields:
type: sequence
label: Fields list
sequence:
first:
type: string
label: First subfield
second:
type: string
label: Second subfield
third:
type: string
label: Third subfield
Done. triples_field.settings is added in new version
Please support datafield with entity
I try but it doesn't work smothly
https://git.drupalcode.org/project/datafield/-/blob/2.x/src/Plugin/Graph...
protected function getSubField(string $subfield, FieldItemInterface $item, FieldContext $context) {
$value = $item->{$subfield};
// Attempt to load the plugin for the field type.
$plugin = $this->getSubfieldPlugin($subfield);
if (!$plugin) {
return $value;
}
$storageSettings = $item->getFieldDefinition()->getSetting('columns')[$subfield];
$fieldSettings = $item->getFieldDefinition()->getSetting('field_settings')[$subfield];
if ($storageSettings["type"] == 'entity_reference' && is_numeric($value)) {
$entity = \Drupal::entityTypeManager()->getStorage($fieldSettings["entity_reference_type"])->load($value);
$item->set('entity', $entity);
$value = $entity->uuid();
}
if ($storageSettings["type"] == 'file' && is_numeric($value)) {
$entity = \Drupal::entityTypeManager()->getStorage('file')->load($value);
$item->set('entity', $entity);
}
// Check if it has a resolver we can hijack.
$class = new \ReflectionClass($plugin['class']);
if (!$class->implementsInterface(FieldProducerItemInterface::class)) {
return $value;
}
// Create an instance of the graphql plugin.
$instance = $this->gqlFieldTypeManager->createInstance($plugin['id'], []);
// Clone the current item into a new object for safety.
$clone = clone $item;
// Generically set the value. Relies on magic method __set().
$clone->value = $value;
// Call the plugin resolver on the subfield.
return $instance->resolveFieldItem($clone, $context);
}
what should I do for the triple field? in the module there is triples_field.schema.yml is there something wrong?
Which text can't you translate? In the module there is no text to translate if you want the title of the modal to create entity, in hook form you can use classic drupal with $form['#title'] = 'whatever'
Surely not. But with Drupal you have enough hooks to do what you want hook form, node presave,...
Basically, it only calls the entity's form builder. If other modules also do the same mechanism, it'll works. If you want, you can create a patch and I will merge it in the module
I don't understand the problem you're presenting. If you don't have experience using Drupal, you can hire an expert who might know how to explain the problem more clearly.
yes it needs longitude and latitude, in address line it should check if enable module address suggestion, so change form api to autocomplete. you can configure ckeditor 5 with auto suggestion to get token. otherwise it must have a configuration to select the provider and API connection.
But why do you need a web form, you can get the same result with contact module + view module + field group. If you need multiple steps, you can do it with the field group bootstrap.
Go ahead, send me a patch. You should base this on the development version that I will merge with the module.
why this ticket is fixed. I just try with use-ajax with a simple view, it always shows the table instead of the view title
I try debug it show $main_content['#title'] have #markup
Please check dev version
I did it
for somone who is looking for
https://www.drupal.org/project/default_content/issues/3426940
✨
UI for import / export Default content
Active
@Graber
why i see in the code it uses array_key_exists instead of '??' I think ?? it's faster and safer
or compatible with old version of php, we can use !empty($array[$key]), this helps to avoid a lot of errors
For someone who looking for dependency injection in VBO and want to get pre-configuration
use Drupal\Core\Plugin\PluginBase;
class CustomVBOAction extends ViewsBulkOperationsActionBase implements ViewsBulkOperationsPreconfigurationInterface, ContainerFactoryPluginInterface {
public function __construct($plugin_id, $plugin_definition, $field_definition, protected EntityTypeManagerInterface $entityTypeManager, protected AccountInterface $currentUser) {
PluginBase::__construct($field_definition, $plugin_id, $plugin_definition);
}
// Execution get error when you need pre-configuration with getConfiguration() it will return NULL. You have to get context instead of getConfiguration()
public function execute($entity = NULL) {
if ($entity) {
$config = $this->getConfiguration();
if (empty($config)) {
$config = $this->context['configuration'];
}
............
}
ah I see, you use html to create a template and print it to pdf. My case is more complicated, the customer uploaded an existing pdf file and I had to insert an digital signature + image signature. The problem is that when I use fpdi to insert images, it can only work with the old pdf version 1.4. The new pdf files have compression mode so fpdi cannot load them. I dont if you have another free library
@gMaximus thanks i fixed it
it takes a lots of time to do it, give me a few cups of coffee to make it faster
If you use Google Place, it will call the global API. Google uses IP address to detect location, it is more accurate, but there is another provider it needs country code to limit results. This option therefore requires a default value. Try searching with a French address, you can find an address in Canada.
If you want to create a patch, it's very easy. You clone the module with git. after modification some code you use
git diff > #numIssue:title.patch
You can't save multiple values in a data field, that's for sure. If you want a text field with full formatting, data field is not an option or use a paragraph
There are 2 hook
date_ical_import_vcalendar: Allow modules to alter the vcalendar object before we interpret it
date_ical_import_component: Allow modules to alter the vcalendar component before we parse it into a Feeds-compatible data array
You can alter data before icalcreator parse.
It doesn't test for gin. best supports bootstrap 5 admin theme. If you use a view reference, don't use pagination.
check dev version if it works
It's normal because it get id from title (id)
$result = preg_match('/\((\d+)\)$/', $value, $matches);
if ($result > 0) {
$value = $matches[$result];
}
so it takes the last one. I don't know how to do better
It was fixed because of the original delta. check dev version. I never thought about this situation. No one swaps line and changes the entity's name to autocreates a new one
it fixed you can try dev version
Export another format like obj, this module only reads one file
I think your theme has a problem. i test on theme
bootstrap 5 admin →
, claro,
gin →
. i don't get any error at all. I think your theme is not displaying the class correctly for many fields
I cannot reproduce your problem. it works fine on my environment. Try dev version with fresh drupal 10.2.5 and see if it work.
Hello,
I tried the data field with the subfield as the entity reference. It only shows the nid but I want all the node's field value like jsonapi. i try converting object node to array.
In explorer it shows NULL in subfield, what did I do wrong?
protected function getSubField(string $subfield, FieldItemInterface $item, FieldContext $context) {
$value = $item->{$subfield};
// Attempt to load the plugin for the field type.
$plugin = $this->getSubfieldPlugin($subfield);
if (!$plugin) {
return $value;
}
$storageSettings = $item->getFieldDefinition()->getSetting('columns')[$subfield];
$fieldSettings = $item->getFieldDefinition()->getSetting('field_settings')[$subfield];
if ($storageSettings["type"] == 'entity_reference' && is_numeric($value)) {
$entity = \Drupal::entityTypeManager()->getStorage($fieldSettings["entity_reference_type"])->load($value);
$value = [];
foreach ($entity->getFields() as $name => $field) {
$value[$name] = $field->getString();
}
return $value;
}
in version 2.0.2 it uses newsest version PHPOffice/PhpSpreadsheet(2.0.0) make sure your PHPOffice is updated in vendor, because there is deprecated function. If you don't want to use PHPOffice/PhpSpreadsheet 2.0.0 don't update module
First of all when you want to post large text. in storage you should set text type to large (default is normal). You can check your PHP memory size.
Check dev version it fixed value when using WYSIWYG
I see check dev version
does it work without generated? I remind you that the data field is not an entity field, if your generator is based on schema storage this will not work. because entity will store entity id in database but it will be generated with field settings
I don't understand much, could you explain in more detail
do you clear the cache? I'm not testing with a custom entity but it still works for content and node taxonomy
are you sure you have the latest version? Your error at line 267 but this module have 227 line of code?
https://git.drupalcode.org/project/datafield/-/blob/2.x/datafield.module...
thanks i change to
$subFields = array_combine($columns, array_map(function ($name) use ($field) {
return [
'type' => static::type($field->getSubfieldTypeSdl($name)),
'description' => (string) $this->t('The @field value of the data field', ['@field' => $name]),
];
}, $columns));
Error gone.
I got values brut, Now i need to convert id of entity reference, file to object, uri id to link, it must do logic in resolveFieldItem
public function resolveFieldItem(FieldItemInterface $item, FieldContext $context) {
$columns = array_keys($this->getFieldDefinition()->getSetting('columns'));
$subfields = [];
foreach ($columns as $subfield) {
$subfields[$subfield] = $this->getSubField($subfield, $item, $context) ?: NULL;
}
return $subfields;
}
do you have any service or helper to convert to graphql compose format?
Yes. I did this in module triple field, but when active triple field in schemas I go back to the explorer node has gone (without error). I put 2 files in graphql compose and like magic it works fine. I tested twice but I can't explain it (I guess the annotation
@GraphQLComposeFieldType cannot detect custom plugin)
Yes it works now i reinstall drupal 10.2.5 again.
Can you support
triple file →
Data field →
it is same double field.
Threejs 3D field →
lazzyvn → created an issue.
I haven't finished new features search for entities reference yet. You can check the new optional "Reference field" in dev version. you will see a new magnifying glass icon, it will allow to select multiple entities like module entity browser
I also want to support graphql in the next version. If you can help me I can release a new version very soon.
what version of Drupal are you using? since 10.2.x the field storage structure has changed in core, I need to change the definitions if you want to debug, see in \datafield\src\Plugin\Field\FieldType\DataField::propertyDefinitions and \datafield\src\Plugin\DataType\DataFieldEntityData.php
it's different between 1.x and 2.x
Have you tried Data Field dev version, maybe it has been fixed?
Test with devel PHP it works fine. I didn't check your module but i think there are small problem with your code
use Drupal\node\Entity\Node;
$node = Node::create(['type' => 'page','title' => 'Test Import ']);
$field_value = [
['taxo' => 1,'tex' => 'test id 1'],
['taxo' => 1,'tex' => 'test id 2']
];
$node->set('field_information', $field_value);
$node->save();
in version 2 it supports rest and json api. you can use entity object (not number with tid) but i would try with number like version 1
I cannot answer your question. I use datafield for my own project ERP, you can compare if you want and tell me the difference. I create a module paragraphs table but it's too difficult for me to use a custom query for the paragraphs. That's why I built data fields for everything I needed. I think datafield similiar double field you can say double field for n subfield. first of all i build triple field just copy from double field, i tried global subfield and i believe i can create for n subfield, then i create data field for multiple purposes. 60% of the widgets and format data fields are copied from drupal core and the rest is customized for my clients. If you have used field collection on drupal 7, I think you cannot find the same module on drupal 10. I try to add all function of collection field to datafield. You can add, edit, duplicate datafield from formatter by example. Datafield only support bootstrap 5 admin theme, it is not design for other theme, Sometimes you can see date of datafield has min max, list converted to datalist,... copy data from excel, support jsonapi, draw chart with google chart or apexchart,... There are new features that will be added to the datafield. like entity browser which will be available soon in the next version, That is making data fields bigger.
I really don't have time to use and compare with another module.
I don't understand clearly. It automatically creates an entity if it does not exist, but in the widget there is an option to lock the creation of a new entity. Maybe you should try before you ask
I want to display the button capture in edit mode. I think modifying javascript to change the src of the image thumbnail is currently preferable
It's so strange that I don't see any difference. can you take a before and after photo please
One thing I can be sure that I don't remove the CDN.
read more in this ticket
Replace external libs with composer, add dependencies
📌
Replace external libs with composer, add dependencies
Closed: works as designed
see another module that I make as an option with local
https://git.drupalcode.org/project/sign_widget/-/blob/8.x-1.x/sign_widge...
No, I want to crop first and after that it will show marker. if they don't want they can click on the Cancel button
I support bootstrap 5 theme, you can replace the CSS with your theme
Yes, I agree but I cannot accept this change. have a website that uses cdn. you can't be selfish for your project and delete the cdn, it will stop working on another site. Use libraries offline as an option it's ok, it can be configurable in the module options, I can accept the patch but not strictly delete cdn
No, I don't want to use the libraries offline. cdn it's better. Otherwise we can have an option in the module configuration for offline mode
@david.muffley Yes, you're right. there are new fixes in the development version, which will make it work, no need to create an update hook to fix all views. please confirm
Hmm I'm retesting carefully with drupal 10.2 PHP8.2 but I can't reproduce this problem
Oh, I think the concept of field group is easy to understand so that's why there is no documentation.
You can do many combination
Exemple multi level tabs. It will memory last open tab (first tab open by default) If you want open custom tab you can set id for your tab and add 1 line jquery $('#idTab').click();
Combination
@brejchova try the dev version it should be ok (it took me a lot of time but I can't reproduce this problem)
Add instructions to the home page module
Add instructions to the home page module
The CDN option to use for admin themes is not the bootstrap 5 admin
add this in your customTheme.info
libraries:
- menu_bootstrap_icon/cdn
I think the menu icons will show with the custom theme, it's so easy to add to the custom theme. so we don't need to use hook page alter.
I can modify the hook page but I think it loses performance.
we can add this in customTheme.info
libraries:
- menu_bootstrap_icon/cdn
CDN option is used for theme admin like Claro. This doesn't mean cdn is also used for frontend.
So strange. I use taxonomy every day and never have this problem.
I guess you are not selecting vocabulary in the field settings
could you debug in file (line 103)
modules/contrib/datafield/src/Plugin/DataField/FieldFormatter/EntityReferenceLabelFormatter.php
it must have $reference_type = 'taxonomy_term' and $entity_id = (your tid)
No, smart dates are not supported it's impossible because it uses integers to store timestamps (Date ranges native drupal uses datetime type), and smart dates require a duration, rrules, and time zone. we don't have it in ical
check dev version it fixed
Are you try dev version? Maybe it fixed
I think this is an unsupported coding language library, try with latin