Check for empty Field

Hello.

New to twig adn drupal.

I am trying to check if a field has value and I use this code

{% if(content.field_info_simeio_synantisis) %}

which is alway true.

Shouldn't this be false from empty fields?

Mulitple image fild always return length of 2

Hello,

I am new to twig and Drupal.

I have an Image Field that can take multiple items.

The following code in twig laways retuns 2 even if there is not image submitted. 

{% for i in 0..node.field_periodic_image_gallery|length-1 %}

Souldn  't this return 0 when I have no image submitted?

Error in loading node

Hi,

I am trying to load a node of type source_node in my hook_form_alter function:

function heritage_schema_form_alter(&$form, FormStateInterface $form_state, $form_id){

if($form_id == 'heritage_schema_add_text_toc') {
$nid = \Drupal::entityQuery('node')->condition('type','source_node')->execute();
$node_info = \Drupal\node\Entity\Node::load($nid);
print_r($node_info->id());exit;

}

}

How to redirect iframe parent page

Hello we currently work on drupal 7 & 8 sites. We are inserting an iframe within our page which is used to subscribe. The iframe is then set to redirect on submission to a thank you page. The problem is the redirect is within the iframe, and we need the parent page to redirect. Does anyone know how I go about doing this. Thanks

Drupal upgrade issue from 8.3.7 to 8.7.2

I upgraded the version from 8.3.7 to 8.7.2 in our UAT server.Once upgrade the version I opened the login page, I am getting the below error.

The website encountered an unexpected error. Please try again later.UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 555 of core/lib/Drupal/Core/Url.php).

[SOLVED] Need Drupal 8 Dev for Personal Site <Dev Found>

Developer found and engaged

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x