Create node with multiple image fields

I have a requirement to create a node with a REST API. I am using the services module from which I am able to create node of any content type successfully. But here I have added new three image fields which contains upload field type.

With this services api, I want to create node with title body and upload 3 images as well from a HTML form.

How can I achieve this with API.

Magento 2 Migration : Destination fields are missing to 2.2.5 Migration i am getting bellow error any idea how to resolve it?

 [2018-07-17 20:23:36][ERROR]: Destination fields are missing. Document: catalog_product_entity_decimal. Fields: row_id     [2018-07-17 20:23:36][ERROR]: Source fields are not mapped. Document: catalog_product_entity_tier_price. Fields: row_id     [2018-07-17 20:23:36][ERROR]: Source fields are not mapped. Document: catalog_product_entity_group_price. Fields: row_id     [2018-07-17 20:23:36][ERROR]: Destination fields are not mapped. Document: catalog_product_entity_tier_price. Fields: row_id 


<?xml version="1.0" encoding="UTF-8"?> <!-- /**  * Copyright © 2013-2017 Magento, Inc. All rights reserved.  * See COPYING.txt for license details.  */ --> <config xmlns:xs="" xs:noNamespaceSchemaLocation="../../config.xsd">     <steps mode="settings">         <step title="Settings Step">             <integrity>Migration\Step\Settings\Integrity</integrity>             <data>Migration\Step\Settings\Data</data>         </step>         <step title="Stores Step">             <integrity>Migration\Step\Stores\Integrity</integrity>             <data>Migration\Step\Stores\Data</data>             <volume>Migration\Step\Stores\Volume</volume>         </step>     </steps>     <steps mode="data">         <step title="Data Integrity Step">             <integrity>Migration\Step\DataIntegrity\Integrity</integrity>         </step>         <step title="EAV Step">             <integrity>Migration\Step\Eav\Integrity</integrity>             <data>Migration\Step\Eav\Data</data>             <volume>Migration\Step\Eav\Volume</volume>         </step>         <step title="Customer Attributes Step">             <integrity>Migration\Step\Customer\Integrity</integrity>             <data>Migration\Step\Customer\Data</data>             <volume>Migration\Step\Customer\Volume</volume>         </step>         <step title="Map Step">             <integrity>Migration\Step\Map\Integrity</integrity>             <data>Migration\Step\Map\Data</data>             <volume>Migration\Step\Map\Volume</volume>         </step>         <step title="Url Rewrite Step">             <integrity>Migration\Step\UrlRewrite\Version191to2000</integrity>             <data>Migration\Step\UrlRewrite\Version191to2000</data>             <volume>Migration\Step\UrlRewrite\Version191to2000</volume>         </step>         <step title="Log Step">             <integrity>Migration\Step\Log\Integrity</integrity>             <data>Migration\Step\Log\Data</data>             <volume>Migration\Step\Log\Volume</volume>         </step>         <step title="Ratings Step">             <integrity>Migration\Step\Ratings\Integrity</integrity>             <data>Migration\Step\Ratings\Data</data>             <volume>Migration\Step\Ratings\Volume</volume>         </step>         <step title="ConfigurablePrices step">             <integrity>Migration\Step\ConfigurablePrices\Integrity</integrity>             <data>Migration\Step\ConfigurablePrices\Data</data>             <volume>Migration\Step\ConfigurablePrices\Volume</volume>         </step>         <step title="OrderGrids Step">             <integrity>Migration\Step\OrderGrids\Integrity</integrity>             <data>Migration\Step\OrderGrids\Data</data>             <volume>Migration\Step\OrderGrids\Volume</volume>         </step>         <step title="Tier Price Step">             <integrity>Migration\Step\TierPrice\Integrity</integrity>             <data>Migration\Step\TierPrice\Data</data>             <volume>Migration\Step\TierPrice\Volume</volume>         </step>         <step title="SalesIncrement Step">             <integrity>Migration\Step\SalesIncrement\Integrity</integrity>             <data>Migration\Step\SalesIncrement\Data</data>             <volume>Migration\Step\SalesIncrement\Volume</volume>         </step>         <step title="PostProcessing Step">             <data>Migration\Step\PostProcessing\Data</data>         </step>     </steps>     <steps mode="delta">         <step title="Customer Attributes Step">             <delta>Migration\Step\Customer\Delta</delta>             <volume>Migration\Step\Customer\Volume</volume>         </step>         <step title="Map Step">             <delta>Migration\Step\Map\Delta</delta>             <volume>Migration\Step\Map\Volume</volume>         </step>         <step title="Log Step">             <delta>Migration\Step\Log\Delta</delta>             <volume>Migration\Step\Log\Volume</volume>         </step>         <step title="OrderGrids Step">             <delta>Migration\Step\OrderGrids\Delta</delta>             <volume>Migration\Step\OrderGrids\Volume</volume>         </step>         <step title="SalesIncrement Step">             <delta>Migration\Step\SalesIncrement\Delta</delta>             <volume>Migration\Step\SalesIncrement\Volume</volume>         </step>     </steps>     <source>         <database host="localhost" name="m1" user="xyz" password="xyz" />     </source>     <destination>         <database host="localhost" name="m2" user="xyz" password="asd" />     </destination>     <options>         <map_file>etc/opensource-to-commerce/</map_file>         <eav_map_file>etc/opensource-to-commerce/map-eav.xml.dist</eav_map_file>         <eav_document_groups_file>etc/opensource-to-commerce/eav-document-groups.xml.dist</eav_document_groups_file>         <eav_attribute_groups_file>etc/opensource-to-commerce/eav-attribute-groups.xml</eav_attribute_groups_file>         <log_map_file>etc/opensource-to-commerce/map-log.xml.dist</log_map_file>         <log_document_groups_file>etc/opensource-to-commerce/log-document-groups.xml.dist</log_document_groups_file>         <settings_map_file>etc/opensource-to-commerce/settings.xml</settings_map_file>         <customer_map_file>etc/opensource-to-commerce/map-customer.xml.dist</customer_map_file>         <customer_document_groups_file>etc/opensource-to-commerce/customer-document-groups.xml.dist</customer_document_groups_file>         <customer_attribute_groups_file>etc/opensource-to-commerce/customer-attribute-groups.xml.dist</customer_attribute_groups_file>         <delta_document_groups_file>etc/opensource-to-commerce/deltalog.xml.dist</delta_document_groups_file>         <order_grids_document_groups_file>etc/opensource-to-commerce/order-grids-document-groups.xml.dist</order_grids_document_groups_file>         <map_document_groups>etc/opensource-to-commerce/map-document-groups.xml.dist</map_document_groups>         <class_map>etc/opensource-to-commerce/class-map.xml</class_map>         <tier_price_map_file>etc/opensource-to-commerce/map-tier-price.xml.dist</tier_price_map_file>         <stores_map_file>etc/opensource-to-commerce/map-stores.xml.dist</stores_map_file>         <!--         In case bulk_size=0 it will be auto-detected for every document.         -->         <bulk_size>0</bulk_size>         <!--         Set direct_document_copy = 1 for better performance.         NOTE: 'source' and 'destination' databases MUST be placed on the same MySQL instance         and 'destination' user MUST be granted with 'SELECT' permissions on 'source' database          -->         <direct_document_copy>0</direct_document_copy>         <source_prefix>mg_</source_prefix>         <dest_prefix />         <auto_resolve_urlrewrite_duplicates>0</auto_resolve_urlrewrite_duplicates>         <log_file>migration.log</log_file>         <progress_bar_format>%percent%% [%bar%] Remaining Time: %remaining%</progress_bar_format>         <upgrade_customer_password_hash>1</upgrade_customer_password_hash>         <edition_migrate>opensource-to-commerce</edition_migrate>         <edition_number></edition_number>         <init_statements_source>SET NAMES utf8;</init_statements_source>         <init_statements_destination>SET NAMES utf8;</init_statements_destination>         <crypt_key>jmhqfife2e5y6377k2h7jv4vvnm4cuzz</crypt_key>     </options> </config> 

Render taxonomy type custom fields individually

I’m kind of a twig newbie so I’m hoping that someone can point me in the right direction.

I’ve added a custom field field_url to a taxonomy type called field_type_poi. How would you render that taxonomy type’s individual field in node.html.twig?
I know that I can use {{ content.field_type_poi }} to render the entire contents of the taxonomy type, but I’m looking for a way to render one field specifically.

Date fields that refuse to be parsed/formatted

I have some very mysterious date fields in a huge (600 000 records) CSV file which absolutely refuses to behave.

They come up aligned left, and conditional formatting shows that they cannot be seen as dates for some reason, even though they are formatted the same as all the other dates — d/m/Y.

What’s more, these same dates are the ones giving me trouble when importing users into WordPress using wp-import. In their user profiles, they show today’s date. About half the dates are doing this.

Any light that could be shed on this would be much appreciated.

enter image description here

Fulltext fields search — ONLY one keyword return none results

I am building search enhancement in Drupal 8 site. I have one search server: Acquia search API In the search API fields tab, i set up title, rendered HTML and taxonomy term as fulltext fields and boost them accordingly.

In my search view, i selected three of them as search fields and put the min keywords length as 1. view picture If i search two keywords, it works good like ‘ONE TWO’. If i only select ‘ONE’, it return none result.

The SQL query looks like the following: Query

Any suggestions will be appreciated.


SharePoint 2013 REST API Filter hidden Fields

I have a little Problem. I’m trying to do the following. There is a Field on SharePoint List items called HasUniqueRoleAssignments that is hidden on a standard REST call. If I put it in the select string of the rest call I will retrieve it. So far so good. But what I apperently can’t do is use it in the filter statement. So the URL

.../sites/site/_api/web/lists/getbytitle('Listname')/items?$  filter=(Some_Standard_Field%20eq%20%27139%27)&$  select=Id,HasUniqueRoleAssignments,Author/Title,Editor/Title,Created,Some_Standard_FieldId&$  expand=Author,Editor&$  top=1000 

will work just fine. But if I try

.../sites/site/_api/web/lists/getbytitle('Listname')/items?$  filter=(HasUniqueRoleAssignments%20eq%20%27false%27)&$  select=Id,HasUniqueRoleAssignments&$  top=1000 

the request will fail with the error message, that the column HasUniqueRoleAssignments is not available.

Does anyone have an idea, how to use the filter to get items with

HasUniqueRoleAssignments = false or true? 

Would be thankful for help

Should input fields be used as ready only information?

I have a license that will be transferred from user “James” to someone in my database (this is enterprise application):

enter image description here

When I click on the name (it means assigned to) it opens a popup so it goes into “edit” mode

enter image description here

The field “From” is just “view” only, because it is pulled from the person who owns the license.

When coding in html and using bootstrap, is this using input field correct?

Get all the text fields type and alter value after save

I’m trying to alter the value of entity text fields upon node save, even the custom-made fields

so far I’ve managed to do that with the title and default body field but not with a custom field, I’m trying to target any field that might be a text field, here’s my code:

function MODULENAME_entity_presave(Drupal\Core\Entity\EntityInterface $  entity) {   $  replacement_pattern = array("/a/", "/b/");    $  replacement = array("c", "d");    /* Check whether it's a node */   if ($  entity instanceof \Drupal\node\NodeInterface) {     // Node title     $  nodeTitle = $  entity->getTitle();     $  entity->setTitle(preg_replace($  replacement_pattern, $  replacement , $  nodeTitle));      // Body main     if(!empty($  entity->body->value)) {       $  entity->body->value = preg_replace($  replacement_pattern, $  replacement , $  entity->body->value);     }      // Body Summary     if(!empty($  entity->body->summary)) {       $  entity->body->summary = preg_replace($  replacement_pattern, $  replacement , $  entity->body->summary);     }   } } 

Twofactor fields, email code + authenticator code. One page or two pages for input?

I have a user action that requires both a mobile authenticator 2fa code, and also a copy-paste from an email (a code). I’m trying to determine whether it would be best to have a single dialog view with input fields for both of these, and a submit button. Or have two separate dialog views, with the first being the email code dialog, and the second being the authenticator dialog.

Pros for same dialog:

  • User can see all auth requirements upfront
  • Makes it clear when there’s a validation error what field it belongs to (doesn’t change to either or view where you’d have to know whether you’re on the authenticator view or email code view)

Cons for same dialog:

  • If user enters the mobile code before the email code there’s a good chance the 2fa code will expire by the time they submit the form.
  • Potentially cognitive overload?

What are your thoughts?

CARBON FIELDS как в комплексном поле задать размер изображения (миниатюры)?

<?php   use Carbon_Fields\Container; use Carbon_Fields\Field;  Container::make('post_meta', 'Вложенные комплексные поля')    ->add_tab('Просто вкладка',[       Field::make( 'complex', 'image_box', 'Комплексное поле' )           ->set_layout( 'tabbed-horizontal' )           ->add_fields( array(              Field::make( 'image', 'image_box_item', 'Изображение' )                 ->set_value_type( 'url' )           ) )   ]); 

Код в шаблоне такой:

  <?php $  image_box = carbon_get_post_meta( $  post->ID, 'image_box');   ?>      <?php foreach ( $  image_box as  $  image_box_item ) { ?>        <div class="image">         <img src="<?php echo $  image_box_item['image_box_img']; ?> " alt="">       </div>     <?php  } ?> 

С простым полем изображения это можно проделать вот так:

Field::make("image", "photo", "Фото")  <php $  thumbnail_id = carbon_get_post_meta($  post_id, 'photo');    ?>  <php thumbnail_url = wp_get_attachment_image_url( $  thumbnail_id, 'full' ); ?>  <!-- выводим миниатюру рубрики на экран --> <img src="<?php echo $  thumbnail_url; ?>" alt="" /> 

Но как это проделать в комплексном поле ???
С php я мало знаком, вот и прошу помощи у гуру своего дела.
Буду очень благодарен, если кто-нибудь подскажет как решить мою проблему!