πŸ‡ΊπŸ‡ΈUnited States @trigdog

Account created on 16 December 2010, almost 14 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States trigdog

After more digging, it seems this may be caused by the simple_multiform call to rebuild their form_alter so any step after the first step is calling the gin_form_alter twice (once for the first load and a second for the rebuild) and drupal_static is not updating the $actions value on the second request. Is there a way make drupal_static work in this scenario?

πŸ‡ΊπŸ‡ΈUnited States trigdog

The merge request seems to fix the problem for the simple_multistep module on first test but I do not know how it would affect the others calls to the _gin_form_actions function in top_bar.theme and local_actions.theme because I have to clear it once it is used or it shows up on pages you don't want it to.

drupal_static seems to be for static content. The simple_mutliform module uses dynamic action buttons during each step. Sometimes a next button will appear, or a back button or both. The save and preview buttons are also hidden and unhidden using the #access property depending on the step in the process. These dynamic changes do not seem work with drupal_static. We may be able to modify the use of drupal_static with a unique name parameter for each step but I couldn't think of a way to call the unique names in page.theme.

πŸ‡ΊπŸ‡ΈUnited States trigdog

This is a possible solution: https://www.drupal.org/project/gin/issues/3488499 πŸ› drupal_static data will not change each time you set it which breaks integrations like Simple Multistep Active

πŸ‡ΊπŸ‡ΈUnited States trigdog

@pyxy - I think the 1.7 minimum requirement was for the Embed β†’ module not entity_embed.

πŸ‡ΊπŸ‡ΈUnited States trigdog

This probably doesn't have anything to do with the ECK as you get the white screen error adding a serial field to a content type without the ECK module being installed.

This is probably a duplicate of:
https://www.drupal.org/project/serial/issues/3412857 πŸ› Error message: There was an unexpected problem serving your request RTBC

πŸ‡ΊπŸ‡ΈUnited States trigdog

Changing status to Critical as this module seems to have an issue with it's field schema (not sure it is just related to Drupal 10 or not).

Got this error as well. Running Drupal 10.2 and the 2.0.0-beta2 of this module. Installed on new site I started today. Installed without errors. Adding a serial field to a content type produces the white screen error and the log shows the error mentioned above:

Drupal\Core\Field\FieldException: Attempted to create an instance of field with name field_client_id on entity type user when the field storage does not exist. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 316 of /opt/drupal/web/core/modules/field/src/Entity/FieldConfig.php).

You cannot access the content type anymore or uninstall the module with this broken field storage but you can remove the broken field using drush.

Steps to remove field using drush:

  • Export site config: drush cem
  • Find the config name for the broke field in the exported directory on the server. In my case it was: field.field.node.invoice.field_invoice_number
  • run the delete config command (replace my config name with yours): drush config-delete field.field.node.invoice.field_invoice_number
  • Clear cache
πŸ‡ΊπŸ‡ΈUnited States trigdog

Here is an example of how to use this on your site:

In a custom module create a services file (ex. - mymodule.services.yml) file and an event subscriber (ex. - src/Event/MyModuleRegcodeSubscriber):

services:
  mymodule.regcode_subscriber:
    class: Drupal\mymodule\Event\MyModuleRegcodeSubscriber
    tags:
      - { name: 'event_subscriber' }
<?php

namespace Drupal\mymodule\Event;

use Drupal\regcode\Event\RegcodeValidateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class MyModuleRegcodeSubscriber implements EventSubscriberInterface {

  /**
   * {@inheritdoc}
   *
   * @return array
   *   The event names to listen for, and the methods that should be executed.
   */
  public static function getSubscribedEvents() {
    return [
      RegcodeValidateEvent::REGCODE_VALIDATE => 'updateRegcode',
    ];
  }

  /**
   * React to a regcode validate event.
   *
   * @param \Drupal\regcode\Event\RegcodeValidateEvent $event
   *   Regcode validate event.
   */
  public function updateRegcode(RegcodeValidateEvent $event) {
    $user_code = $event->getUserEnteredRegcode();
    $db_code = $event->getRegcode();

    // Only react if the code isn't in regcode db table.
    if (!$db_code) {
      // Check if code is valid.
      if ($this->checkRegcode($user_code)) {
        // Create code on the fly.
        $code = new \stdClass();
        $code->code = $user_code;
        $event->setAndSaveAlteredRegcode($code);
      }
    }
  }

  /**
   * Validate the code.
   *
   * @return bool
   *   TRUE or FALSE if the code is valid.
   *
   */
  private function checkRegcode($code) {
    // Put custom validation code here.
  }

}
πŸ‡ΊπŸ‡ΈUnited States trigdog

Missed a couple. Hopefully this one is good.

πŸ‡ΊπŸ‡ΈUnited States trigdog

Patch didn't attach, trying again.

πŸ‡ΊπŸ‡ΈUnited States trigdog

They finally got back. This is their response:

"Our developer team explained that we don't expose the store's default currency in the API currently"

So we will need to remove/rework that bit of code. I will try and get to that in the next couple days.

@DennisBradenton - The patch in #5 does seem to work if you generate the new private token at https://developers.printful.com/ and paste the token in the api key field. Everything I have tested has worked and the issue mentioned in #7 is just an error that is logged and needs fixed. The orders still posts to Printful just fine and the product syncing also works.

πŸ‡ΊπŸ‡ΈUnited States trigdog

@alphex, are you sure you have the checkbox checked to "Display embedded entities" on your text format (Full HTML for example) you enabled the entity embed button on?

Production build 0.71.5 2024