🇮🇷Iran @Mehrdad201

Account created on 1 April 2011, over 13 years ago
#

Recent comments

🇮🇷Iran Mehrdad201

Thanks a lot @saurabh.dhariwal
#4
your solution works well.

🇮🇷Iran Mehrdad201

I found that problem happened because pf getRandomAd function.

getRandomAd function located at AdContentBucket.php only same the first item of each size and it seems random selector doesn't work.

because every time after running the bellow code

      $result = $query
        ->range(0, 1)
        ->sort('id')
        ->execute();

the first record of selected size is received and loaded to ad_content variable.

I changed the code and now it works but I am not sure that what I have done is true or false.

here is my changed code:

      $result = $query
        //->range(0, 1)
        ->sort('id')
        ->execute();

      if ($result) {
        shuffle($result)
        /** @var \Drupal\ad_content\Entity\AdContentInterface $ad_content */
        $ad_content = $storage->load(reset($result));
      }
🇮🇷Iran Mehrdad201

Hi all friends

I used patch from comment #20 (in top of comments).

I applied it on both .dev and 7.x-1.2 versions. php is 5.6.

In both cases, I faced bug

Fatal error: Call to undefined function _imagewebp_get_affected_images() in 

it seems function _imagewebp_get_affected_images not exists.

what can I do?

🇮🇷Iran Mehrdad201

@Orkut Murat Yılmaz I am using the latest version. 10.2.0

A member with id @apaderno has explained this error in stack exchange.

here is his explanation:

The issue is in the Advanced CSS/JS Aggregation module that, in its SettingsForm::submitForm() method, sets the stale_file_threshold value in the system.performance configuration object.

The issue is in the Advanced CSS/JS Aggregation module that, in its SettingsForm::submitForm() method, sets the stale_file_threshold value in the system.performance configuration object.

$this->config('system.performance')
  ->set('stale_file_threshold', $form_state->getValue('stale_file_threshold'))
  ->set('css.gzip', $form_state->getValue('css_gzip'))
  ->set('js.gzip', $form_state->getValue('js_gzip'))
  ->save();

Drupal core validates the configuration objects with schema files like system.schema.yml; since stale_file_threshold is not defined in that file, Drupal reports an error.

This can only be fixed by the project maintainers. The module should not write a configuration value the System module does not recognize in its configuration object.

It is fine to change the css.gzip and the js.gzip values because the configuration schema defines both of them, but adding new values just causes errors like the one you saw.

Production build 0.71.5 2024