πŸ‡ΊπŸ‡¦Ukraine @Mykola Dolynskyi

Poltava
Account created on 7 April 2015, about 9 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

Still facing this in Drupal 9.5.2 in context of https://www.drupal.org/project/dashboards/issues/3294986 πŸ› Error: Call to undefined method Drupal\dashboards\Entity\Dashboard Closed: works as designed

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

++ for #16, it worked, thanks @Henry Tran

Strange SMTP was working OK, but when I added MimeMail got this problem

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

same, if I set mailsystem formatter = Mime Mail mailer and Sender = SMTP mailer - I get subject error
If both SMTP mailer - mail sent OK and arrives, but no HTML
If both Mime Mail mailer - no errors, but email does not arrive

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

It does not go anywhere because debug print function is not implemented by SMTP module authors 

web/modules/contrib/smtp/src/Plugin/Mail/SMTPMailSystem.php

    // Turn on debugging, if requested.

    if ($this->smtpConfig->get('smtp_debugging')

      && $this->currentUser->hasPermission('administer smtp module')) {

      $mailer->Debugoutput = function($str, $level) {

// drupal set message $str

      };

      $mailer->SMTPDebug = TRUE;

    }

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

True, widget does not save selected with core field type daterange, but only with module provided daterange_timezone

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

@cilefen, @pradhumanjain2311 - thanks!

@cilefen I dont know how to do regression test. But the scenario to reproduce the problem is to install 4 modules mentioned in #0, then webform_rest/[anywebformhere]/fields?_format=json or similar will stop working throwing the exception "No route found for the specified format html. Supported formats: json, xml.".

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

@cilefen thanks for info, but I have to do this fix for 9.5 first. I cant run tests now for 10.x as too much modules to update for this project, but it will be done by end of year.

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

@cilefen my mistake, wrong lock file
its 9.5.2 actually.
And I believe situation is the same for Drupal 10 too, cause my stack is not very often used (basically must have REST on with EntityDomain to get this flow with problem)

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

Tried everything.
Only #64 works, thanks @khaldoon_masud

Geocoder 3.47

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

agreed. Spent 10 mins to figure out mystical meaning behind the "window"

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

adding patch

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

thanks @Rodlangh and @decloedt.simon@gmail.com
@borisson_ I dont remember already, but I believe not needed because tests were ok

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

adding patch which overcomes https://www.drupal.org/project/drupal/issues/3031271#comment-15257741 ✨ Support version negotiation for any entity type (currently only Node & Media are supported) Fixed

It basically ignores parent part of access check if parent is null

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

update to https://www.drupal.org/project/drupal/issues/3031271#comment-14884943 ✨ Support version negotiation for any entity type (currently only Node & Media are supported) Fixed - it was working good, until we deleted some nodes which share the paragraph

afterthat we getting

Error: Call to a member function getEntityType() on null in Drupal\jsonapi\Access\EntityAccessChecker>checkRevisionViewAccess() (line 249 of web/core/modules/jsonapi/src/Access/EntityAccessChecker.php)

    switch ($entity_type->id()) {
      case 'node':
      case 'media':
        $access = $entity->access('view all revisions', $account, TRUE);
        break;
      // Project-specific modification... Allow access to revisions of paragraphs
      // if the current user has access to the parent entity and to this
      // version of this paragraph. Note, this is not a perfect implementation.
      // Ideally we should be checking for access to the specific version of the
      // parent entity but there appears to be no way to do that with
      // information available at this point until
      // https://www.drupal.org/project/paragraphs/issues/2954512 is committed.
      case 'paragraph':
        assert($entity instanceof ParagraphInterface);
        $parent = $entity->getParentEntity();
        // Parent became grand parent
        while ($parent->getEntityType()->id() === 'paragraph') {
          $parent = $parent->getParentEntity();  // <--------- line 249
        }
πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

adding patch for v 1.5, previous was for 1.x which differs

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

@robertom invokation of metatags_alter(array &$metatags, array &$context) still not happening when called from JSON API endpoint

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

    if (preg_match('/(^\/'.$domain_suffix.'(\s+)?(\r\n|\r|\n|$)+)|(^\/'.$domain_suffix.'\/(.+))/i', $path, $matches)) {
      $path = preg_replace('@^/' . $domain_suffix . '(.*)@', '$1', $path);
    }

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

Core firing hook_entity_insert() and hook_entity_insert() before transaction is finished may be not so bad, but bad there are no same hooks to be fired after transaction finished and no tables locked!

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

#4 does not work not for 'date' not for 'datetime'
format keeps rendered mm/dd/YY

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

had such issue, first request respects _format=json and next for the same server invocations are not.

after wasted hours of tracing and debugging I ended up with adding custom middleware

<?php

namespace Drupal\xxx;

use Drupal\Core\Http\InputBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpFoundation\InputBag as SymfonyInputBag;

/**
 * FirstMiddleware middleware.
 */
class RequestFormatMiddleware implements HttpKernelInterface {

    /**
     * The kernel.
     *
     * @var \Symfony\Component\HttpKernel\HttpKernelInterface
     */
    protected $httpKernel;

    /**
     * Constructs the FirstMiddleware object.
     *
     * @param \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel
     *   The decorated kernel.
     */
    public function __construct(HttpKernelInterface $http_kernel) {
        $this->httpKernel = $http_kernel;
    }

    /**
     * {@inheritdoc}
     */
    public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {

		if(empty($request->getRequestFormat(null)) && !empty($request->get('_format'))) {
			$request->setRequestFormat($request->get('_format'));
		}

		Request::setFactory(
			function ($query, $request, $attributes, $cookies, $files, $server, $content) {
				$current = \Drupal::request();
				if(empty($attributes['_format']) && !empty($current->getRequestFormat(null))) {
					$attributes['_format'] = $current->getRequestFormat(null);
				}
				$request = new Request($query, $request, $attributes, $cookies, $files, $server, $content);
				foreach (['request', 'query', 'cookies'] as $bag) {
					if (!($bag instanceof SymfonyInputBag)) {
					$request->$bag = new InputBag($request->$bag->all());
					}
				}
				return $request;
			}
		  );

        return $this->httpKernel->handle($request, $type, $catch);
    }

}
πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

what this "Waiting for branch to pass" means at all? My previous merge and patch stuck there for 4 weeks with no step to actual testing. And new one right now is kinda to be the same.

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

@jcnventura re-enrolled
https://www.drupal.org/project/hubspot_forms/issues/3336554 πŸ› API key sunset - expose API params to settings form + loop batch fetching Fixed

P.S. Why is this?
PHP 7.4 & MySQL 5.7, D9.4.8 Skipped, branch did not pass for 4 weeks

Should I click "Dont wait pass" button in my new MR above? Because it is likely to end with the same

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

latest update: v2 and v3 API are not able to fetch more than 100 forms, no matter how big number in `?limit=xxx` param
will do new merge request soon

πŸ‡ΊπŸ‡¦Ukraine Mykola Dolynskyi Poltava

https://www.drupal.org/project/drupal/issues/3031271#comment-13706800 ✨ Support version negotiation for any entity type (currently only Node & Media are supported) Fixed

@lois.chabrand , @PQ - thank you very much, with small changes that works good to drupal 9.5.2

Production build 0.69.0 2024