🇬🇧United Kingdom @matt b

Account created on 11 December 2006, about 18 years ago
#

Recent comments

🇬🇧United Kingdom matt b

@timohuisman's page (#85) works for me. Thank you.

🇬🇧United Kingdom matt b
🇬🇧United Kingdom matt b

Just hit the same issue on Drupal 10.3.6 - will test some more but I suspect it may also be CAPTCHA related?

🇬🇧United Kingdom matt b

I'm not embedding media from my own domain in an iframe. So... I don't need to worry about this right?

The annoying thing is I get the warning anyway and the only way to disable it is to put something in the field.

🇬🇧United Kingdom matt b

Thank you @Chi. That did the trick, I'd not noticed it needed to be under 'settings'.

Really appreciate the quick response!

🇬🇧United Kingdom matt b

Thanks for the update. I no longer use mailchimp due to poor service provision so migrated away last week.

🇬🇧United Kingdom matt b

I've switched to using the Entity PDF module, which uses mpdf as the engine. It is rendering Arabic characters fine.

🇬🇧United Kingdom matt b

Just in case anyone comes across this... all you really seem to have in the htmlpdf.html.twig template is the {{ title }} and {{ content }} variables - I guess because we're dealing with the rendered PDF, not with theming entity.

However, it is possible to do more with the twig_tweak module . With this I can get the node ID and then render a specific field from that node. It's probably not the best way... but it gets the job done.

    {% set nid=drupal_token('current-page:url:args:value:2')%}
    <p>{{ drupal_field('field_author', 'node', nid) }}</p>
🇬🇧United Kingdom matt b

Agreed - they should update their website to either say they don't support drupal any more, or get on and role out a Drupal 10 module.

https://docraptor.com/documentation/article/1067564-making-pdf-documents...

🇬🇧United Kingdom matt b

So my host (pantheon) won't allow additional binaries to be installed, although they do have WKHTMLTOPDF which is fine but not going to work for me, which means my weasyprint journey ends here. I can either move host or pay for a 3rd party pdf service as none of the entity_print engines work for me.

🇬🇧United Kingdom matt b

pushed to the next environment and it works fine there! Now I get "The weasyprint binary does not exist at /usr/local/bin/weasyprint"
(also tried /usr/bin/weasyprint). WKHTMLTOPDF is in /usr/local/bin/ so I need to see if I can find the binary on the hosted enviroment or if I've missed a step.

🇬🇧United Kingdom matt b

Ok, looks like it's something to do with my local environment. I use pantheon + lando. As soon as a pushed from my lando run local env to pantheon dev, the messages are resolved on dev.

🇬🇧United Kingdom matt b

Same issue here. I've installed mikehaertl/phpwkhtmltopdf as directed and the message won't go away. I've also installed tecnickcom/tcpdf and the TCPDF message did go away and the engine is available for use. But I still have the issue with wkhtmltopdf which is the one I wanted to try.

🇬🇧United Kingdom matt b

No it didn't. I just tried to add Wkhtmltopdf as well. Composer installs it fine, but even after a cache rebuild I still have the message that this also is not available. It may be my local enviroment, so I'll keep checking, as this is probably a separate issue.

+1 for separate modules for PDF engines!

🇬🇧United Kingdom matt b

Just patched using https://git.drupalcode.org/project/entity_print/-/merge_requests/28.patch which applied fine.

At /admin/config/content/entityprint, I get the message
Php Weasyprint is not available because it is not configured. Please install with: composer require "pontedilana/php-weasyprint".

Install weasyprint via composer, check it's installed (it's in the vendor directory), reload /admin/config/content/entityprint and I still get the message (and can't select weasyprint as an engine)

🇬🇧United Kingdom matt b

Matt B created an issue.

🇬🇧United Kingdom matt b

I think the following is relevant, and this is probably a support request rather than a bug fix due this being a feature not supported by DomPDF?

https://github.com/dompdf/dompdf/issues/2619
https://github.com/dompdf/dompdf/pull/2107

Also, google about, I got the hint that this may not be an issue with Wkhtmltopdf, so I might give that a try (something for another day!)

🇬🇧United Kingdom matt b

In the end I found a way of fixing how the external services consume the information.  It would still be useful to understand the best way to update or atleast get a list of nodes that meet a specific criteria that Views and 'out of the box' Drupal cannot handle.

🇬🇧United Kingdom matt b

I cannot comment for the OP, but I'm still struggling to get output in Farsi / Persian.

I've set

* {
    font-family: 'DejaVu Sans', sans-serif, Courier;
}

In the css, and whilst it now produces characters instead of lots of ??? (one or two specific issues in my header, which I'll look at separately), but when I copy and translate the text back to english using google translate it's clearly not giving me the original text, and when I compare to the original text in Drupal it is different - something is happening in the PDF production process.

This text (from both the node content and .../debug) looks correct (probably reverts to LTR here) :

در اشعيا باب ۵۵ آيه ٣ خدا از ما ميخواهد که به نزد او بياييم، به او گوش دهيم و زندگی واقعی پيدا کنيم .
خدا نمی خواهد ما هلاک شويم. او می خواهد که ما در پادشاهی او باشيم و به پسر عزيزش عيسی اين امکان را داده است تا او اين امر را فراهم کند.

But is displayed in the PDF as

هب ،مييايب وا دزن هب هک دهاوخيم ام زا ادخ ٣هيآ ۵۵باب ايعشا رد
. مينک اديپ یعقاو یگدنز و ميهد شوگ وا
وا یهاشداپ رد ام هک دهاوخ یم وا .ميوش کاله ام دهاوخ یمن ادخ
وا ات تسا هداد ار ناکما نيا یسيع شزيزع رسپ هب و ميشاب
. دنک مهارف ار رما نيا

🇬🇧United Kingdom matt b

I have done some further testing. The Term Title is displayed when there is content related to the term. When there is no content there is not Term Title, in English or a translated language. I added a new category called 'Test' with not content. There is no Term Title. When I add an article with the category of 'Test', the Term Title is then displayed on the Term page.

My term pages are overriden by a view, but I cannot see anything obvious there that should not display the term title (the body is still displayed) if there is no content. I've also checked my theme and have removed any templates that might effect the term page display, cleared cacheds and still get the same results. So I don't think this is theme related.

Here's my Taxonomy Term page config:

uuid: 4d3e3f4f-a21d-424c-bb36-b7c569cc6648
langcode: en
status: true
dependencies:
  config:
    - core.entity_view_mode.node.teaser
    - node.type.article
    - views.view.recordings_library_catalogue
  module:
    - node
    - taxonomy
    - user
_core:
  default_config_hash: Gy5PaLdfFhtFSRqJxV-DBTF5AocKgNA2CsCNNEbvx4c
id: taxonomy_term
label: 'Taxonomy term'
module: taxonomy
description: 'Content belonging to a certain taxonomy term.'
tag: default
base_table: node_field_data
base_field: nid
display:
  default:
    id: default
    display_title: Master
    display_plugin: default
    position: 0
    display_options:
      fields:
        type:
          id: type
          table: node_field_data
          field: type
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: node
          entity_field: type
          plugin_id: field
          label: ''
          exclude: false
          alter:
            alter_text: true
            text: '<h2>{{ type }}s:</h2>'
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_label
          settings:
            link: false
          group_column: target_id
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
      pager:
        type: full
        options:
          offset: 0
          items_per_page: 10
          total_pages: 0
          id: 0
          tags:
            next: ››
            previous: ‹‹
            first: '« First'
            last: 'Last »'
          expose:
            items_per_page: false
            items_per_page_label: 'Items per page'
            items_per_page_options: '5, 10, 25, 50'
            items_per_page_options_all: false
            items_per_page_options_all_label: '- All -'
            offset: false
            offset_label: Offset
          quantity: 9
          pagination_heading_level: h4
      exposed_form:
        type: basic
        options:
          submit_button: Filter
          reset_button: false
          reset_button_label: Clear
          exposed_sorts_label: 'Sort by'
          expose_sort_order: false
          sort_asc_label: Asc
          sort_desc_label: Desc
      access:
        type: perm
        options:
          perm: 'access content'
      cache:
        type: tag
        options: {  }
      empty:
        view:
          id: view
          table: views
          field: view
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: view
          empty: true
          view_to_insert: 'recordings_library_catalogue:page_1'
          inherit_arguments: true
      sorts:
        sticky:
          id: sticky
          table: taxonomy_index
          field: sticky
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: standard
          order: DESC
          expose:
            label: ''
            field_identifier: sticky
          exposed: false
        created:
          id: created
          table: taxonomy_index
          field: created
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: date
          order: DESC
          expose:
            label: ''
            field_identifier: created
          exposed: false
          granularity: second
      arguments:
        term_node_tid_depth:
          id: term_node_tid_depth
          table: node_field_data
          field: term_node_tid_depth
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: node
          plugin_id: taxonomy_index_tid_depth
          default_action: 'not found'
          exception:
            value: all
            title_enable: false
            title: All
          title_enable: true
          title: '{{ arguments.tid }}'
          default_argument_type: fixed
          default_argument_options:
            argument: ''
          summary_options:
            base_path: ''
            count: true
            override: false
            items_per_page: 25
          summary:
            sort_order: asc
            number_of_records: 0
            format: default_summary
          specify_validation: true
          validate:
            type: 'entity:taxonomy_term'
            fail: 'not found'
          validate_options:
            bundles: {  }
            access: true
            operation: view
            multiple: 0
          break_phrase: false
          depth: 1
          use_taxonomy_term_path: false
      filters:
        langcode:
          id: langcode
          table: node_field_data
          field: langcode
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: node
          entity_field: langcode
          plugin_id: language
          operator: in
          value:
            '***LANGUAGE_language_content***': '***LANGUAGE_language_content***'
          group: 1
          exposed: false
          expose:
            operator_id: ''
            label: ''
            description: ''
            use_operator: false
            operator: ''
            operator_limit_selection: false
            operator_list: {  }
            identifier: ''
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
            reduce: false
          is_grouped: false
          group_info:
            label: ''
            description: ''
            identifier: ''
            optional: true
            widget: select
            multiple: false
            remember: false
            default_group: All
            default_group_multiple: {  }
            group_items: {  }
        status:
          id: status
          table: taxonomy_index
          field: status
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: boolean
          operator: '='
          value: '1'
          group: 1
          exposed: false
          expose:
            operator_id: ''
            label: ''
            description: ''
            use_operator: false
            operator: ''
            operator_limit_selection: false
            operator_list: {  }
            identifier: ''
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
          is_grouped: false
          group_info:
            label: ''
            description: ''
            identifier: ''
            optional: true
            widget: select
            multiple: false
            remember: false
            default_group: All
            default_group_multiple: {  }
            group_items: {  }
        type:
          id: type
          table: node_field_data
          field: type
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: node
          entity_field: type
          plugin_id: bundle
          operator: in
          value:
            article: article
          group: 1
          exposed: false
          expose:
            operator_id: ''
            label: ''
            description: ''
            use_operator: false
            operator: ''
            operator_limit_selection: false
            operator_list: {  }
            identifier: ''
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
            reduce: false
          is_grouped: false
          group_info:
            label: ''
            description: ''
            identifier: ''
            optional: true
            widget: select
            multiple: false
            remember: false
            default_group: All
            default_group_multiple: {  }
            group_items: {  }
      style:
        type: default
        options:
          grouping: {  }
          row_class: ''
          default_row_class: true
          uses_fields: true
      row:
        type: 'entity:node'
        options:
          view_mode: teaser
      query:
        type: views_query
        options:
          query_comment: ''
          disable_sql_rewrite: false
          distinct: true
          replica: false
          query_tags: {  }
      relationships: {  }
      link_display: page_1
      link_url: ''
      header:
        area:
          id: area
          table: views
          field: area
          relationship: none
          group_type: group
          admin_label: 'Term Title'
          plugin_id: text
          empty: false
          content:
            value: '<h2>{{ arguments.term_node_tid_depth }}</h2>'
            format: basic_html
          tokenize: true
        entity_taxonomy_term:
          id: entity_taxonomy_term
          table: views
          field: entity_taxonomy_term
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: entity
          empty: true
          target: '{{ raw_arguments.term_node_tid_depth }}'
          view_mode: full
          tokenize: true
          bypass_access: false
      footer:
        view:
          id: view
          table: views
          field: view
          plugin_id: view
      display_extenders: {  }
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
        - url.query_args
        - 'user.node_grants:view'
        - user.permissions
      tags: {  }
  page_1:
    id: page_1
    display_title: Taxonomy
    display_plugin: page
    position: 1
    display_options:
      query:
        type: views_query
        options: {  }
      defaults:
        footer: false
      display_description: ''
      footer: {  }
      exposed_block: false
      display_extenders: {  }
      path: taxonomy/term/%
      menu:
        type: none
        title: Articles
        description: ''
        weight: 0
        expanded: false
        menu_name: main
        parent: ''
        context: '0'
      tab_options:
        type: none
        title: ''
        description: ''
        weight: 0
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
        - url.query_args
        - 'user.node_grants:view'
        - user.permissions
      tags: {  }
🇬🇧United Kingdom matt b

If you want to use a different font you can just load them via CSS?

@font-face {
    font-family: 'Noto Sans';
    src: url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap') format('truetype');
}

* {
    font-family: 'Noto Sans', sans-serif, Courier;
}

Based on https://github.com/dompdf/dompdf/issues/932#issuecomment-1253830558

🇬🇧United Kingdom matt b

This is still an issue. Since upgrading to 10.3 now instead of displaying the untranslated term title, no term title is displayed. It is shown in the english version of the page. Please re-open.

🇬🇧United Kingdom matt b

This is still an issue and it seems all the referenced issues are "Closed (works as designed)" or "Postponed". Could we have a clear path to when this will be resolved and what the work around is please.

🇬🇧United Kingdom matt b

Any progress on this please?

🇬🇧United Kingdom matt b

I'm closing this as I've managed to fix the issue and there was something weird in the view.

The issue was to do with the contextual filter, (field_organisation: Content) Tracker: Nid

Not sure why Tracker was being used here, not Content. It's been through a few migrations and upgrades (from Drupal 6!) which may be the reason why. I removed the filter and recreated it using ID in the Content category: (field_organisation: Content) Content: ID (Default: Content ID from URL)

The views block now displays fine, with no WSD.

🇬🇧United Kingdom matt b

Oh sorry - I meant to include those!

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of /app/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).

#0 /app/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(260): Drupal\Core\Entity\EntityTypeManager->getDefinition(NULL)
#1 /app/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(195): Drupal\Core\Entity\EntityTypeManager->getHandler(NULL, 'storage')
#2 /app/web/core/modules/views/src/Plugin/views/argument/EntityArgument.php(75): Drupal\Core\Entity\EntityTypeManager->getStorage(NULL)
#3 /app/web/core/modules/views/src/Plugin/views/argument/NumericArgument.php(80): Drupal\views\Plugin\views\argument\EntityArgument->titleQuery()
#4 /app/web/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php(1048): Drupal\views\Plugin\views\argument\NumericArgument->title()
#5 /app/web/core/modules/views/src/ViewExecutable.php(1169): Drupal\views\Plugin\views\argument\ArgumentPluginBase->getTitle()
#6 /app/web/core/modules/views/src/ViewExecutable.php(1326): Drupal\views\ViewExecutable->_buildArguments()
#7 /app/web/core/modules/views/src/ViewExecutable.php(1450): Drupal\views\ViewExecutable->build(NULL)
#8 /app/web/core/modules/views/src/ViewExecutable.php(1513): Drupal\views\ViewExecutable->execute(NULL)
#9 /app/web/core/modules/views/src/Plugin/views/display/Block.php(133): Drupal\views\ViewExecutable->render()
#10 /app/web/core/modules/views/src/ViewExecutable.php(1689): Drupal\views\Plugin\views\display\Block->execute()
#11 /app/web/core/modules/views/src/Element/View.php(81): Drupal\views\ViewExecutable->executeDisplay('block_1', Array)
#12 /app/web/core/modules/views/src/Plugin/Block/ViewsBlock.php(61): Drupal\views\Element\View::preRenderViewElement(Array)
#13 /app/web/core/modules/block/src/BlockViewBuilder.php(171): Drupal\views\Plugin\Block\ViewsBlock->build()
#14 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array)
#15 /app/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array('Drupal\\block\\Bl...', Array)
#16 /app/web/core/lib/Drupal/Core/Render/Renderer.php(870): Drupal\Core\Render\Renderer->doTrustedCallback('Drupal\\block\\Bl...', Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#17 /app/web/core/lib/Drupal/Core/Render/Renderer.php(432): Drupal\Core\Render\Renderer->doCallback('#pre_render', 'Drupal\\block\\Bl...', Array)
#18 /app/web/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender(Array)
#19 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#20 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render(Array)
#21 /app/web/sites/default/files/php/twig/6679cf0676f48_page.html.twig_zXBJ4eWdFG43tfDViS2Qf0P0C/r0t2NdnmY0u30YNF6cn3Yv9TCAzOjoWkdC-0FFC0EMo.php(98): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#22 /app/vendor/twig/twig/src/Template.php(360): __TwigTemplate_ef9c3b0ef148e0de6ab83a3182d1be47->doDisplay(Array, Array)
#23 /app/vendor/twig/twig/src/Template.php(335): Twig\Template->yield(Array)
#24 /app/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#25 /app/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
#26 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/custom/c...', Array)
#27 /app/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render('page', Array)
#28 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#29 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render(Array)
#30 /app/web/sites/default/files/php/twig/6679cf0676f48_html.html.twig_li9d6DKFnipluCIT-quR9gVG3/49vYTTWa7DJutRO0f4erIJM5jm_by-TYE_yc4r5-f64.php(87): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#31 /app/vendor/twig/twig/src/Template.php(360): __TwigTemplate_2f65b8edfe3c2a160d4f151cc11c2c3c->doDisplay(Array, Array)
#32 /app/vendor/twig/twig/src/Template.php(335): Twig\Template->yield(Array)
#33 /app/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#34 /app/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
#35 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/contrib/...', Array)
#36 /app/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render('html', Array)
#37 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#38 /app/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(158): Drupal\Core\Render\Renderer->render(Array)
#39 /app/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#40 /app/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(159): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#41 /app/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#42 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#43 /app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#44 /app/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#45 /app/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#46 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#47 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /app/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#49 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#50 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#51 /app/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#52 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#53 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#54 /app/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#55 /app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#56 /app/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#57 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#58 {main}
🇬🇧United Kingdom matt b

So Madhu Kumar M E in #4 was on the right lines for a work around. I installed the twig_tweak module. I added this to my theme preprocess function:

  // pull out nid to use in template for twig tweaks
  $variables['nid']= \Drupal::routeMatch()->getParameter('entity_id');

and then this works in the template file:

    <div>Tags: {{ drupal_field('field_tags', 'node', nid) }}</div>
    <div>Author: {{ drupal_field('field_author', 'node', nid) }}</div>
    <div>Body: {{ drupal_field('body', 'node', nid) }}</div>
    <div>Created: {{ drupal_field('created', 'node', nid) }}</div>

However, this is a workaround. The module should expose the fields in the PDF view mode to us in the same way we can in the node template file - as per this comment extracted from node.html.twig:

 * - content: All node items. Use {{ content }} to print them all,
 *   or print a subset such as {{ content.field_example }}. Use
 *   {{ content|without('field_example') }} to temporarily suppress the printing
 *   of a given child element.

I believe this is a feature request, not a support request. Please update the metadata on this issue if you disagree!

🇬🇧United Kingdom matt b

Would an approach be to subscribe to the print events and add content there somehow?

🇬🇧United Kingdom matt b

I have the same issue, I want to style the fields included in the PDF view separately to the entity body. The only thing I can do is manipulate {{ content }}

  <div class="content">
    <div>Created: {{ content.created.value }}</div>
    <div>Tags: {{ content.field_tags.value }}</div>
    <div>Author: {{ content.field_author.value }}</div>
    <div>Body: {{ content.body.value }}</div>
    <div>Created: {{ node.created.value }}</div>
    <div>Tags: {{ node.field_tags.value }}</div>
    <div>Author: {{ node.field_author.value }}</div>
    <div>Body: {{ node.body.value }}</div>
    <div>{{ content }}</div>
  </div>

Everything returns empty except {{ content }}

I've tried handling this in preprocessing, but it's further complicated by this being on a multilingual site. I should just be able to get to the individual field values.

🇬🇧United Kingdom matt b

patch from #21 works for me - will do until this is solved

🇬🇧United Kingdom matt b

Just re-ran composer update and second patch (#20) won't apply, but I'm working fine with the first patch (#13)

🇬🇧United Kingdom matt b

Grrrr: the issue was this line:

    article: cilbartik/article-pdf'

The documentation is fine

🇬🇧United Kingdom matt b

Trying to get this to work with the article content type and it's just not picking up my custom article-pdf.css file.

Added to my theme info:

entity_print:
  node:
    # Adds article-pdf css library to the Article bundle on the Node entity.
    article: cilbartik/article-pdf'

my libraries yml

base:
  version: VERSION
  css:
    theme:
      css/cilbartik.css: {}
article-pdf:
  version: VERSION
  css:
    theme:
      css/article-pdf.css: {}

I've created the entity-print--node--article.html.twig 

As far as I can see I've followed these instructions but they do not work.

🇬🇧United Kingdom matt b

Same issue here. Any updates or support for this?

🇬🇧United Kingdom matt b

I've just hit the same issue. I'm busy enabling translation on my site, having had issues years back with Media when it was a contrib module, I'd resisted implementing. Enabled it in D10 and hit this. Media does give a nice interface, but this issue means it is still unusable.

I tried @miksha's patch ( https://www.drupal.org/project/drupal/issues/3197416#comment-15325059 🐛 MediaLibraryFieldWidgetOpener::checkAccess denies access when modifying field values on a translated entity revision Needs work ) and it would not apply.

🇬🇧United Kingdom matt b

Thank you for reporting this, I was not sure about what the 'create media' permission was for, compared to the other similar permissions, until I read this!

🇬🇧United Kingdom matt b

Tested manually. I'm not seeing a search keyword entry and I get the following error when adding an image by a URL:

Error: Class "Unsplash\HttpClient" not found in Drupal\media_entity_unsplash\UnsplashFetcher->setCredentials() (line 102 of /app/web/modules/custom/media_entity_unsplash/src/UnsplashFetcher.php).
🇬🇧United Kingdom matt b

Ignore me - had an issue with composer, thought I'd installed the issue branch but turns out it was the dev branch. I'll test it manually.

🇬🇧United Kingdom matt b

Hi - I agree with the motivation for this. I've tried installing this fork though, and I cannot see where I enter the keyword?

🇬🇧United Kingdom matt b

Applied the patch and ran an auto accept job, it's still showing as open. I also need to clear down all the other auto accepted jobs.

🇬🇧United Kingdom matt b

This was postponed a year ago. Any movement?

I can see this is reference in this issue here, which is giving me a problem making my site mutlilingual: https://www.drupal.org/project/field_group/issues/3111107 🐛 Field Group Label are not translating Closed: won't fix

🇬🇧United Kingdom matt b

I'm seeing this issue on 8.x-1.3 - I have made an existing site multilingual and now cannot translate the Options Email field. I will test the patch on my dev site.

🇬🇧United Kingdom matt b

Thank you for this - I'm very time poor at the moment, so haven't had an opportunity to test!

🇬🇧United Kingdom matt b

Thanks Berdir, that helps peice it together a bit!

🇬🇧United Kingdom matt b

Did this ever get addressed? It doesn't like like it's an option in the latest version. Having this would make it much more useable for a Drupal User translator.

🇬🇧United Kingdom matt b

First off, this tool looks amazing. Huge kudos to everyone involved. It looks very mature, and I think I can figure it all out. However, the lack of up to date documentation really does need attention. Having looked around the module and the out of date docs... I have at least two questions:
1) What is the Cart thing? How is that different to requesting a translation - seems to be the same thing?
2) What is the difference between Jobs and Job Items? It seems to be a different view of the same list of jobs, what is the reason for the distinction.

I've done a lot of searching and find very little that explains the workflow of the a translation and the different features that are available.

🇬🇧United Kingdom matt b

Struggling to find up to date documentation, was anything ever done?

🇬🇧United Kingdom matt b

Hola! I've patched my dev environment with this and can translate the other languages on my site. Thanks for this.

🇬🇧United Kingdom matt b

I've still got production patched to work around this. Can we get this merged please?

🇬🇧United Kingdom matt b

I've been running in production with this patch for some time now. Let's just get this committed please!

🇬🇧United Kingdom matt b

So... after posting this I then found the answer.  It's not a permission issue as such (not in the Role permissions).  I need to give the role access to the relevant Text format at /admin/config/content/formats

🇬🇧United Kingdom matt b

It seems that translators need full site admin to translate the site?  I have created a translator role.  I want this role to translate:

  • Custom Block Content 
  • Menu Items
  • User Account Fields

As well as content and user interface strings (which seems to be managed)

I don't want the translator to be able to administer users, place blocks, create new menus.

As admin I can go to /admin/content/block and against each block I can select the Translate action.  I can give the Translator role the 'Access the Content blocks overview page' permission, and they get the Translate action only.  However they are blocked from translating the body field.  The field is greyed out with the text "Ce champ a été désactivé car vous n'avez pas les droits suffisants pour le modifier." (if I'm translating to French - "This field has been disabled because you do not have sufficient rights to modify it.")

What permission is needed to translate the body field without giving full admin to all the site blocks.

🇬🇧United Kingdom matt b

Thanks, and understood on the priorities. 9 years and it comes back to haunt you!

I have also checked I can log in as the original user as 'Example' or 'example' (didn't check any other variations) so the username is tried in a case insensitive manner on login, but not on registration.

🇬🇧United Kingdom matt b

Fair enough, but for me a WSD when someone tries to register renders a site unusable

I wanted to rule out any contrib module on my site causing this issue, so I stood up a fresh v10.2.2 standard install on Pantheon and am able to replicated the issue.

🇬🇧United Kingdom matt b

Perfect thank you - I can now install the module via composer :-)

🇬🇧United Kingdom matt b

Marking this as closed as the workaround was working, and thinkshout (@bdimaggio) have now patched and released a new version of the library and this module, as per #3407124 📌 Require new version of mailchimp-api-php Active

🇬🇧United Kingdom matt b

This patch enables the batch to run: https://patch-diff.githubusercontent.com/raw/thinkshout/mailchimp-api-ph...

Patching is a work around though, the library needs fixing.

🇬🇧United Kingdom matt b

Ahhhhh, now I feel very stupid. I use pantheon.io (that's not the stupid bit) and I set the test enviroment to be password protected so test content isn't on the public web. This of course meant that mailchimp is trying the callback URL and it's failing due to the password challenge. Set the test site to public and it all works fine.

I wonder if it was similar for @menteb?

🇬🇧United Kingdom matt b

Also doesn't make a difference going to the global settings page and saving again.

I will probably need to revert back to the old version of this module as it worked.

🇬🇧United Kingdom matt b

same issue here but for existing webhooks. Worked fine prior to the upgrade from 8.x-1.x

🇬🇧United Kingdom matt b

Once I switched to OAuth I could then view the Audience list as expected. This error just needs to be handled better.

🇬🇧United Kingdom matt b

Also confirming patch #16 fixed the issue for me. Can we release this please, I don't like to operate production sites with patches.

🇬🇧United Kingdom matt b

Hi, running Upgrade Status, whilst the module is listed as D10 compatible, there are 24 problems listed, including 2 deprecations:

web/modules/composer/smtp/src/Plugin/Mail/SMTPMailSystem.php - line 270
Call to deprecated method mimeHeaderEncode() of class Drupal\Component\Utility\Unicode. Deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Mime\Header\UnstructuredHeader instead.

web/modules/composer/smtp/src/Plugin/Mail/SMTPMailSystem.php - line 418
Call to deprecated method mimeHeaderEncode() of class Drupal\Component\Utility\Unicode. Deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Mime\Header\UnstructuredHeader instead.

I've attached the text export from the Upgrade Status module ( https://www.drupal.org/project/upgrade_status )

🇬🇧United Kingdom matt b

Hi - I've now updated for Drupal 10 compatibility. Could the module be released please?

🇬🇧United Kingdom matt b

Tested, the patches apply and pass Upgrade Status checks. I am blocked from registering with an invalid code, and can register using a valid one. Please commit and release a D10 version.

🇬🇧United Kingdom matt b

Patched and tested. Please issue the D10 release.

🇬🇧United Kingdom matt b

This is also being picked up by the Upgrade Status module. It looks like the automated patches here should be sufficient to make this module D10 compatible.

🇬🇧United Kingdom matt b

This is being picked up by the Upgrade Status module. It looks like the automated patches should be sufficient to make this module D10 compatible.

🇬🇧United Kingdom matt b

I no longer use this module, as noone else has raised it, this can be closed.

🇬🇧United Kingdom matt b

I no longer use this module, as noone else has raised it, this can be closed.

🇬🇧United Kingdom matt b

I think it can be closed :-). I can't even remember why I needed this (it was clearly important at the time!)

Production build 0.71.5 2024