Programmatically set exposed input for a View Block

So I have a Drupal 8.5.5 with a View with a single Block display. This block has an exposed input set. I recently learned that the exposed form will not appear unless you configure the Block to use AJAX, which doesn't suit my purposes. Therefore I'd like a way to set the Exposed Input manually via a hook (or some other means).

I have tried populating the exposed input via several hooks, but none of them are influencing the results of the block, they just appear to be ignoring it. Enabling AJAX on the Block does work, but like I say this does not suit my purposes.

Drupal form errors in json format

Hi Team, 

Is there any way we can get drupal form errors (all) in json format. 

For eg: I created a form with fields name(required=>TRUE), age(required=>TRUE), city , submit . 

Now if any user submit the form by disabling HTML required field false, they should receive a json which should have some message like

{
    "name": "name field required.",
    "age" : "age field required"
 }

Any ideas??

I have tried using $errors = $form_state->getErrors(); in validateForm function but than I'm not able to change 

After updating Drupal nodes disappear from article list upon editing

Hi! 

I recently updated Drupal 6 to 8 and I migrated a lot of posts from the old page to the new one. 
Everything worked correctly, but if I edit an old article, it disappears from the list where it should appear. I can access it from the Contents page, but I don't know what to do for it to appear again on the website.

I am a novice in Drupal this is the first time I had to work in it.

page not found

hello I have a page not found error this is my codes : 

  1. routing 

booking.booking_form:

path: '/booking/{id}'

defaults:

_form: '\Drupal\booking\Form\BookingForm'

_title: 'booking'

requirements:

_permission: 'access content'

booking.liste:

path: '/booking/list'

defaults:

_controller: '\Drupal\booking\Controller\ListeController::getliste'

_title: 'Liste'

requirements:

_permission: 'access content'

2. module 

<?php

Error when checking site information using Drupal 8.6.1

Fresh clean install of 8.6.1 when I go into site information i get this error(turned error checking and messages on):

Updating to 8.6.1 - something happened this time

I took the steps to migrate an 8.5.6 site to the newest 8.6.1 version.

I did what I've done in the past, that is:

1) manually replace (via FTP) the directories 'core' and 'vendor' with the new versions and then

2) run www.lexhamarts.org/update.php.

This has always worked in the past. 

This time, however, when I tried to run update.php, I get a 

www.lexhamarts.org is currently unable to handle this request.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x