Account created on 20 December 2008, over 15 years ago
#

Merge Requests

Recent comments

🇺🇸United States glynster

This was the perfect solution for us:
https://www.drupal.org/project/media_thumbnails/issues/3149842 📌 Ability to edit thumbnail manually or programmatically RTBC

In some ways, it is much better as you have complete control over updating the thumbnail when and if needed.

🇺🇸United States glynster

This patch is so useful great job @lamp5 +1 RTBC

🇺🇸United States glynster

FYI: We have managed to hook in Nuxt Auth for our use case. This enables clients to login through a general form using /user/login and user/logout. We use the rest api We also push the new cookie from the response header to the front end which keep font/back end in sync. As well as that we have a session with access to the standard user info. Within that session we have access to csrf_token so we could perform user/node updates if needed. So far so good!

🇺🇸United States glynster

@fago I had actually thought of the permissions/roles being added to the API. I was thinking it makes sense to have a current_user section. Much like the response from /user/login. Then you have more flexibility and keeps things very simple. I agree with the complication of Nuxt Auth. As you say once the forms are connected I think this solves a lot of things. Then users can login from either end and all works as needed.

As to the admin menu then you could have a welcome back or username along with a logout.

Rock on for

user-login forms on the frontend working
🇺🇸United States glynster

For us the issue was Nginx.

Updated the Vhost from:

location ~ ^/sites/.*/files/styles/

to

location ~ ^/sites/.*/files/(css|js|styles)/ {

Resolved the issue right away.

🇺🇸United States glynster

Would it make more sense to use a robust module on the Nuxt side for Auth?

Such as:
https://github.com/sidebase/nuxt-auth

This way the communication, along with permissions and roles can be used?

🇺🇸United States glynster

Is there anything else you need from me for this?

🇺🇸United States glynster

I have gone ahead and closed the org MR. Happy to help as needed but also do not want to get in the way. Obviously the objective is to be able to set an expiry length!

🇺🇸United States glynster

@pwolanin @alexpott did I break something?

🇺🇸United States glynster

Seems like we can close this now as this is part of the latest release.

🇺🇸United States glynster

Added to git now. As I have looked no filtering or sorting is added to the API unless it is set to expose in Views. So I think that works fine. Let me know.

🇺🇸United States glynster

@fago, I guess I missed the connection, I will go ahead and do the MR.

I don't think we need to to do a check as in views you have an option to expose. So if they never expose the filters then it should not return anything in the API output. To me this makes sense. Let me add in the if check and take it from there.

Once I have this done yes I can jump into the Vue side of things. We usually use something like vue multi-select. We have also been looking at Nuxt UI lately. Our current setup is Bootstrap 5.3. Totally off topic but would it make sense to offer a basic vue theme using Nuxt UI?

🇺🇸United States glynster

Is it possible for me to do a MR to help include the code better?

🇺🇸United States glynster

Confirmed as soon as we revert to beta4 the urls for the API are corrected.

🇺🇸United States glynster

Could this have introduced an issue with the View API Output links? At this point anytime we review the API we are redirected to the Nuxt app. Probably a small case missed perhaps?

🇺🇸United States glynster

Added as a patch and works well. I was not sure how to do a PR. Let me know if I need to adjust anything.

🇺🇸United States glynster

I just ran a quick test with the module and this is exactly what you want.

🇺🇸United States glynster

Great news and it make sense, due to the forms support. We have been playing around a little to get things working. This module and code provided some useful hints:

https://git.drupalcode.org/project/views_better_rest/-/blob/1.0.x/src/Pl...

If we get any success we would be happy to add this to a PR.

🇺🇸United States glynster

@mandclu just wanted to give you some feedback.

As our setup was from 2019, we had many nodes. We applied the 2 proposed patches:

Provide a flag to allow updates to stored schema for fields Needs review
🐛 node.field_[name] field needs to be updated Needs review

And this resolved the problem, allowing the schema to fully update and keep all the data intact. Super easy and a huge help!

🇺🇸United States glynster

@cinglefield1 we have used version 8 in production with great success. So perhaps look there first.

🇺🇸United States glynster

Props to @marco.aresu the latest patch works a treat when using Varnish. We were encountering the same issue. Patch resolves the problem right away.

🇺🇸United States glynster

Adding the following to the default.vcl resolves the issue:

sub vcl_hash {

    # ... (existing code)

    /** If Bin is set - add it to hash data for this page */
    hash_data(req.http.X-Bin);

    return (lookup);
}
# Respond to incoming requests.
sub vcl_recv {

    # ... (existing code)

 # Do not cache if the user is logged in as an admin.
    if (req.http.Cookie ~ "^(|.*; ?)S?SESS([a-z0-9]{32}=[^;]+)(;.*|)$" &&
        req.http.Cookie ~ "^(|.*; ?)ADVBIN=administrator(|;.*|)$") {
        set req.http.X-Bin = "role:administrator";
        set req.hash_always_miss = true; # Ensure a cache miss for admin requests
    }

  return (hash);
}

We have tested this on Arc, Chrome, FireFox, and Safari and it works as expected.

Perhaps we are doing something wrong initially. Would love some feedback!

🇺🇸United States glynster

Here is some additional information:

This issue occurs on macOSX with Chrome, Safari, and Arc. Interestingly, it does not manifest in Firefox. Firefox behaves as expected. I'm uncertain if this detail helps in identifying the underlying issue.

🇺🇸United States glynster

Awesome, love the admin theme and this tiny tweak makes all the diff!

🇺🇸United States glynster

Fantastic news, thanks for the update. I will test and get back to you with the outcome!

🇺🇸United States glynster

Thanks so much for getting back to me. Sadly I have the same module setup as you. I am also fully using the ddev setup to make sure I have not missed anything.

    "require": {
        "composer/installers": "^1.9",
        "drupal/admin_toolbar": "^3.4",
        "drupal/core-composer-scaffold": "^10",
        "drupal/core-project-message": "^10",
        "drupal/core-recommended": "^10",
        "drupal/devel": "^5.1",
        "drupal/lupus_decoupled": "1.x-dev",
        "drupal/services_env_parameter": "^1.3",
        "drush/drush": "^11",
        "drupal/schema_metatag": "2.5.0",
        "drupal/metatag": "^1.26.0"
    },

I have also added the following:

Schema.org Article
Schema.org Metatag
Schema.org Organization

We are running Drupal 10.1.5

I have also attached some screenshots.

🇺🇸United States glynster

@brad.bulger and @sclsweb does the patch cover all those issues? As it stands now the patch no longer applies as this was updated in core: 🐛 [DrupalMedia] Formatting lost when attempting to edit media within a list item in CKEditor 5 Fixed . I assume we need a re-roll?

🇺🇸United States glynster

Any further ideas on this front?

🇺🇸United States glynster

I think with the latest Drupal release this patch is no longer needed? Drupal 10.1.5. Also the patch does not apply either.

🇺🇸United States glynster

Thanks to @fargo Drupal demo video I managed to get the views working:

https://www.youtube.com/watch?v=KKTl4z_MGSg

The step I was missing was to create a new view display with "Custom Elements Display" and then set to content instead of fields:

🇺🇸United States glynster

The latest version is: 8.x-1.11. Please try this and see if you still have the issue.

🇺🇸United States glynster

Thanks so much for your contribution, @sidharth_soman. Your patch was included in our latest release.

🇺🇸United States glynster

@yannickbaettig Thanks for your contribution. Merged and added to the latest release.

🇺🇸United States glynster

glynster made their first commit to this issue’s fork.

🇺🇸United States glynster

@isramv I am not able to reproduce this. Can you please test with the latest release 8.1.17 and see if you can still replicate?

🇺🇸United States glynster

That is not how you resend the user password from the admin interface. Instead you would go to admin/people and use the contextual dropdown menu for the user as per the screenshot.

🇺🇸United States glynster

@komalparmar thanks so much for your contribution to this module. I have gone ahead and added in your suggestions to the latest release 8.1.17.

🇺🇸United States glynster

@lamp5, thank you again for your contribution and patch. I have added your update to the latest release 8.1.17.

🇺🇸United States glynster

@lamp5, thank you so much for your work and the supplied patch. I have reviewed your code and added it to the latest release, 8.1.17. I have also credited you for your work.

🇺🇸United States glynster

Thanks so much, @yannickbaettig, for your contribution. Your updates have been included in the latest release, 8.1.17, as well as credit!

🇺🇸United States glynster

+1 RTBC this patch works well and helps with the end user having to input multiple passwords.

🇺🇸United States glynster

+1 RTBC huge help for theming and very standard, please consider adding to the module.

🇺🇸United States glynster

Some updates for you:

  • To get the cron working again I have to delete the recurring instances. Luckily this was a site where all past events had been and gone and were no longer published. Then the cron ran without issue.
  • We then deleted the field_datetime smart date field and added it back using the same machine name, cleared caches and this resolved the Mismatch issue. Not ideal as it wipes out all the dates.
  • We were then able to do a drush cex and push this to live.

Not an ideal situation unless you can remove the data.

We also tried to save the storage settings for the field but would always get the same error message:

The SQL storage cannot change the schema for an existing field (field_datetime in node entity) with data.

🇺🇸United States glynster

@mandclu is there anything else I can help with on this?

🇺🇸United States glynster

@s_leu your patch does apply to Drupal 10.1.3, so we are set! RTBC +1

🇺🇸United States glynster

Unfortunately still no luck even with your suggestion.

<script id="ldjson-schema" type="application/ld+json" data-hid="1e0f0a2">[]</script>

{ "meta": [ { "name": "title", "content": "Test 3 | lupus_decoupled" }, { "name": "description", "content": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." }, { "name": "@type", "content": "Article", "group": "schema_article", "schema_metatag": true }, { "name": "@id", "content": "dfdfg", "group": "schema_article", "schema_metatag": true }, { "name": "name", "content": "ertert", "group": "schema_article", "schema_metatag": true }, { "name": "headline", "content": "234234", "group": "schema_article", "schema_metatag": true }, { "name": "about", "content": "werwer", "group": "schema_article", "schema_metatag": true }, { "name": "@type", "content": "Airline", "group": "schema_organization", "schema_metatag": true }, { "name": "additionalType", "content": "HighSchool", "group": "schema_organization", "schema_metatag": true }, { "name": "sameAs", "content": "sadasd", "group": "schema_organization", "schema_metatag": true }, { "name": "name", "content": "GG", "group": "schema_organization", "schema_metatag": true }, { "name": "description", "content": "I am good", "group": "schema_organization", "schema_metatag": true }, { "name": "url", "content": "google.com", "group": "schema_organization", "schema_metatag": true } ], "link": [ { "rel": "canonical", "href": "http://127.0.0.1:63609/test-3" } ] }

🇺🇸United States glynster

Interesting I cannot run the cron and get this:

The website encountered an unexpected error. Please try again later.

Error: Call to a member function getColumns() on bool in Drupal\Core\Entity\Query\Sql\Tables->addField() (line 246 of core/lib/Drupal/Core/Entity/Query/Sql/Tables.php).
Drupal\Core\Entity\Query\Sql\Condition->compile(Object) (Line: 176)
Drupal\Core\Entity\Query\Sql\Query->compile() (Line: 81)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 285)
Drupal\smart_date_recur\Entity\SmartDateRule->getParentEntity(1) (Line: 786)
smart_date_recur_cron() (Line: 335)

Perhaps this is what helps us solve the issue?

🇺🇸United States glynster

Right, makes sense as the update did perform without a failure. If you need me to run any tests let me know.

I do have another website on Smart Date 4.0.3 which I can test on upgrading to 4.1.0-rc2. I am pretty sure that site was using the same base as this example.

🇺🇸United States glynster

Here is a screenshot with all the table info.

🇺🇸United States glynster

This project goes back to 2019.

"name": "drupal/smart_date",
            "version": "3.1.0",
            "source": {
                "type": "git",
                "url": "https://git.drupalcode.org/project/smart_date.git",
                "reference": "3.1.0"
            },

Is that what you need?

🇺🇸United States glynster

@mandclu sorry you are right but that is due to another entity mis-match issue related to the media module!

The node.field_image_media field needs to be updated.

So at this time is there anything else I can supply that might be helpful.

🇺🇸United States glynster

Hey @TurtlBbx yes we are using the supplied code as above. But the problem happens before then as you can see above.

Here is the code we are using:

useHead({
  title: page.value.title,
  meta: page.value.metatags.meta,
  link: page.value.metatags.link,
  script: [
    {
      type: 'application/ld+json',
      children: JSON.stringify(page.value.metatags.jsonld || [], null, ''),
    },
  ],
})

The issue being application/ld+json is not grouped and is looped as general meta: page.value.metatags.meta, here are the examples:

{
            "name": "@type",
            "content": "Organization",
            "group": "schema_organization",
            "schema_metatag": true
        },
        {
            "name": "additionalType",
            "content": "CollegeOrUniversity",
            "group": "schema_organization",
            "schema_metatag": true
        },
        {
            "name": "sameAs",
            "content": "sadasd",
            "group": "schema_organization",
            "schema_metatag": true
        },
        {
            "name": "name",
            "content": "GG",
            "group": "schema_organization",
            "schema_metatag": true
        },
        {
            "name": "description",
            "content": "I am good",
            "group": "schema_organization",
            "schema_metatag": true
        },
        {
            "name": "url",
            "content": "google.com",
            "group": "schema_organization",
            "schema_metatag": true
        }

The above should be wrapped in the application/ld+json script.

I think the issue is on the module end as it needs to group them so Nuxt can render correctly.

Let me know if you need any further information.

🇺🇸United States glynster

Hey @mandclu, thank you for responding.
Yes, we also executed the command `drush updb`, and we observed the required update, which ran successfully.

The initial error is the one displayed on the Drupal Status Page.

The second error occurs when we run the command `drush entity-updates`, which typically resolves the problem. Is there anything else I can include in Devel to generate more informative error messages?

🇺🇸United States glynster

@s_leu your patch does not apply to Drupal 10.1.2, however #23 still does and works as expected.

🇺🇸United States glynster
Drupal 10.1.2
PHP 8.2.9
Simple Media Bulk Upload 1.0.1

Here are my steps to reproduce:

  1. /admin/content/media > Bulk upload
  2. drag and drop 2 x images (jpeg)
  3. Continue
  4. First image form (/media/240/edit?bulk_upload_ids%5B0%5D=241), then save

Then the follow error and url:

  1. media/240/edit?bulk_upload_ids%5B0%5D=241

InvalidArgumentException: Expected a scalar value as a 2nd argument to "Symfony\Component\HttpFoundation\InputBag::get()", "array" given. in Symfony\Component\HttpFoundation\InputBag->get() (line 31 of /var/www/html/vendor/symfony/http-foundation/InputBag.php).

Regardless both images saved.

Performing the exact same procesdure with the patch enables the second image for to show and adjust/save as image 1.

Hope this helps!

🇺🇸United States glynster

RTBC +1 please.

🇺🇸United States glynster

@Grimreaper, this patch works a treat and is a very simple and elegant addition! RTBC +1.

🇺🇸United States glynster

This is huge and with the patch solves many trivial issues. RTBC +1.

🇺🇸United States glynster

Fixes the issue immediately! Great job hoping this can be merged swiftly!!

🇺🇸United States glynster

I just added 'organization' and 'article' schema and it seems you could use the $metatag_values['#attributes']['group'] to group?

🇺🇸United States glynster

I had a quick look at the PHP and this is the raw meta export. Nothing is grouped here either:

"test": [
  {
    "title": {
      "#tag": "meta",
      "#attributes": {
        "name": "title",
        "content": "Test | lupus_decoupled"
      }
    },
    "description": {
      "#tag": "meta",
      "#attributes": {
        "name": "description",
        "content": "Lorem Ipsum is simply dummy text of the printing and typesetting im."
      }
    },
    "canonical_url": {
      "#tag": "link",
      "#attributes": {
        "rel": "canonical",
        "href": "http://d10.ddev.site/node/1"
      }
    },
    "schema_organization_type": {
      "#tag": "meta",
      "#attributes": {
        "name": "@type",
        "content": "Organization",
        "group": "schema_organization",
        "schema_metatag": true
      }
    },
    "schema_organization_additional_type": {
      "#tag": "meta",
      "#attributes": {
        "name": "additionalType",
        "content": "CollegeOrUniversity",
        "group": "schema_organization",
        "schema_metatag": true
      }
    },
    "schema_organization_same_as_0": {
      "#tag": "meta",
      "#attributes": {
        "name": "sameAs",
        "content": "sadasd",
        "group": "schema_organization",
        "schema_metatag": true
      }
    },
    "schema_organization_name": {
      "#tag": "meta",
      "#attributes": {
        "name": "name",
        "content": "GG",
        "group": "schema_organization",
        "schema_metatag": true
      }
    },
    "schema_organization_description": {
      "#tag": "meta",
      "#attributes": {
        "name": "description",
        "content": "I am good",
        "group": "schema_organization",
        "schema_metatag": true
      }
    },
    "schema_organization_url": {
      "#tag": "meta",
      "#attributes": {
        "name": "url",
        "content": "google.com",
        "group": "schema_organization",
        "schema_metatag": true
      }
    }
  }
]

That said Nuxt is expecting something as you can see:

script: [
    {
      type: "application/ld+json",
      children: JSON.stringify(page.value.metatags.jsonld || [], null, ""),
    },
  ],
Production build 0.69.0 2024