Newburgh, NY
Account created on 26 January 2005, about 20 years ago
#

Merge Requests

Recent comments

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Color module is no longer included in core, so the example is not installable unless you require it.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

@mglaman yep. I thought "Basic site info" would be a good place for it because email is there too. It feels like that form is the core identity of the site.

Also, if Drupal core had this feature, it could set DRUPAL_ENV to prod only if the URL matches. It would be a very simple way to detect environment on any system. No more if/then/else clutter in settings.php.

A comment by Ryan Price on linkedin brought up "trusted hosts"... Maybe we need a "trusted prod hosts"?

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I coincidentally installed metatags on my site yesterday, and it has a field "Canonical URL".

Did a little digging. Seems like this could be useful for printing these tags.

https://developers.google.com/search/docs/crawling-indexing/canonicaliza...

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Matt: Yes, this is specifically for the prod URL. Can be used both for showing admin users in the status report page, and for detecting if a site is "live" or not.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Added "category" to plugin definition to tell it where to display.

"site" category is for things that don't change across environments, like install profile or install time.

"environment" category is for things that are specific to that environment, such as PHP version and Drupal version.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Development on this feature has moved to āœØ Add "system.site" service to access information about the site. Active . Keeping this issue for discussing the Main URL field specifically.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Update: After thinking a few days I think "Main URL" is the best human-readable name for this property.

"Canonical URL" is still good for the backend, I think. "Main URL" is a little vague when used in code.

Thoughts?

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Like

SiteService::isCanonical() as a universal way to see if a site is "live" or not.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Matt: I'm thinking Main URL is a good human label, but like canonical for the property name.

Open to whatever.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

@matt: is the APP_URL for the current site? Or as a reference for the live site?

This is to store the live site so users can see it in status reports etc.

I think the screenshot is confusing. The default value is whatever site you are on, hence "localhost" because I was using PHP CLI server, but normally you would put in a separate domain.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Could we send this to the new contributors team?

Would make a great first contribution for someone!

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY
šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY
šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Jon Pugh ā†’ created an issue. See original summary ā†’ .

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I made a library to try and set settings.php for all host providers.

If the host provider doesn't set the env var, we can putenv() from the host vendor code. (Platform, ddev, etc)

Then $databases can always be set from envs.

https://github.com/operations-project/drupal-settings/blob/2.x/Settings%...

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

The file is for devshop, it will need to be updated for aegir.

I'll try to set aside some time this week to do this.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

MathMadd I think that can happen if migrate_tools is not enabled which can happen if you installed path_redirect_import before version 2.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Is that a problem people are having? Migrate Tools is not installed?

The dependency on migrate_tools was only added a year ago and I am not seeing an update hook to enable it.

https://git.drupalcode.org/project/path_redirect_import/-/commit/b0c4dd1...

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Both modules have made the change needed in dev branches only.

Until there is a new release, you have to require the dev versions.

composer require drupal/path_redirect_import:2.0.x-dev drupal/migrate_tools:6.0.x-dev

To confirm, open up the files PathRedirectImportCommands.php and MigrateToolsCommands.php, and check the namespace.

In path_redirect_import, it reads:

use Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands;

In MigrateToolsCommands it should read:

namespace Drupal\migrate_tools\Drush\Commands;

HOWEVER....

It still doesn't work on my site, because somehow, Migrate Tools was disabled but path_redirect_import is still enabled.

Maybe this will work for you?

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Passing to Drupal.org project queue.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Jon Pugh ā†’ made their first commit to this issueā€™s fork.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY
šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

This is a crazy hack. This patch has to be used in devshop control (composer-based hostmaster.)

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY
šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I didn't patch against the right repo. new patches attached.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I'm not sure if bad path mappings should be ignored or exceptions should be thrown.

Here are two patches for each possibility.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Attached is a patch for drush 8 to make it compatible with symfony/console 5+, which allows hostmaster commands to run against drupal 10 sites.

Provision has a composer.json file, which can include patches.

Hostmaster can be built using a composer.json file. See https://github.com/opendevshop/devshop/blob/1.x/src/DevShop/Control/comp...

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Came across this issue when upgrade a site from 9 to 10.0 using bricks.module.

From debugging I traced it down to this: Bricks.module is now showing a field "revision_id" that does not exist in $field_definitions.

The error comes when trying to run the update hooks so I can't update any schemas.

Applying the patch worked.

Attached is a new patch for 10.0.x

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Jon Pugh ā†’ made their first commit to this issueā€™s fork.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Fixed. rc2 coming up.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Patch applied. Thanks!

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Removed the patch completely. It's only needed when using views.

I added help text to the README about the patches.

To test:

composer require drupal/site:2.x-dev

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

For anyone looking, the patch for the above MR can be viewed here: https://git.drupalcode.org/project/drupal/-/merge_requests/4953.patch

Uploading it here for testing.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

You can work around this by setting the intercom/intercom-php library version in your composer:

composer require drupal/intercom intercom/intercom-php:"^3 || ^4" -W

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Marking needs review to get some attention.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Thanks apaderno!

Strange thing, though ... I'm not seeing content on the planet feed? I went back 3-4 pages.

https://www.drupal.org/planet ā†’

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Can I get this reviewed again? New content is up.

Thanks!

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Jon Pugh ā†’ created an issue.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

DevShop runs hosting 4.x and provision 4.x in a composer platform, which includes drush8.

Then, drush 10/11 is installed globally.

Running drush @hostmaster works, properly passes from drush 11 to site-local drush8 in hostmaster.

https://github.com/opendevshop/devshop/blob/1.x/src/DevShop/Control/comp...

It uses provision 4.x and hosting 4.x branch, which is just a stopgap for current generation. Lots of hacks to get DevShop more stable. I added drush9+ yml alias ge eration so "drush sa" works with both drush 8 and 9+.

If someone wants to take this back to aegir, feel free.

It works.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

FWIW I am still getting the error. I had to fully remove the .behat.inc files to get bin/behat to run.

drupal/lightning_core * 5.14.0
behat/behat v3.13.0
drupal/drupal-extension v5.0.0rc1

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

The problem is that the entity that is referenced is missing.

The new MR is against 3.2.x. It simply returns "" for a label if none is found. This is important because the relation entity still exists, so in order to be clickable, label has to be something.

See https://git.drupalcode.org/project/group/-/merge_requests/107

This is what it looks like:

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

For clarity, this is what I did to cause this error:

In a custom Deriver class, getDerivativeDefinitions method, I changed this:

      $this->derivatives[$name]->set('label', t('Organization site (@type)', ['@type' => $label]));

to this:

      $this->derivatives[$name]->set('label', t($label));

Instead of doing logic checks, I think it would be simpler to create a setLabel() method so that you could force the parameter to be TranslatableMarkup. There is already a getLabel() method.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Add specifics about Site UUID and config exports.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

In order for this to be accepted, please include changes to automated tests to check for additional violations.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I am with you on DDEV. It has much better MacOS support, right? I use ubuntu for daily driver. Even then installing lando takes a deb tweak.

I struggled to get multisite to work in Lando. It would not work properly with a single container.

If you had the bandwidth to submit a MR with ddev config, I would merge it.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Actually I think I fixed this in my most recent branch.

I'm planning on merging today.

See feature/project-fields branch

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Check settings.php at the bottom. Sometimes drush adds the MySQL credentials which is wrong. The creds are set automatically for each separate site.

Remove the $databases array and try.again.

Just to confirm, using 2.x branch?

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Catch missing user and improve messaging.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Here's what it looks like:

www-data@7840126ff815:~$ drush key:set admin

In KeyAuthCommands.php line 64:
                                                                 
  User already has API key. Use --force option to overwrite it.  
                                                                 

www-data@7840126ff815:~$ drush key:set admin --force

 ! [NOTE] User's existing API key was removed.                                             

 [success] API key for user admin was set to 9a99e567bbd5983beb318274baf96273.
www-data@7840126ff815:~$ drush key:set admin abc123 --force

 ! [NOTE] User's existing API key was removed.                                             

 [success] API key for user admin was set to abc123.
šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I created a new branch and merge request to add a drush command: 'key:set'

Patch attached.

MR here: https://git.drupalcode.org/project/key_auth/-/merge_requests/13

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I don't recommend this approach in the core module.

However I too need the ability to insert an existing key.

My use case is for testing and development of a number of sites at once. I want to hard code a key into the development settings so that I don't have to generate a new one and set it in the client everytime I install or sync the site in.

To add a key, just set the api_key field on users. Custom code or an add on module for managing keys could be created.

See UserKeyAuthForm::submitForm():

 // Generate a new key.
    User::load($form['#uid'])
      ->set('api_key', $this->keyAuth->generateKey())
      ->save();
šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I would like to take over this project namespace for a different purpose, to track back-end tasks for site module ā†’ .

There is a Drupal 9+ replacement for this module, Tasks Module ā†’ .

There was a 8.x development release here, but virtually zero usage.

Is it ok to start something new here?

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Fixed it! (I think?)

The crazy bundle field definitions we are doing. We needed to reset the keyvalue cache for fields.

Not sure why. Looks like we could make some core improvements here.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY
šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Other thoughts...

I would like to separate Site.module from the Site API & Manager connection stuff at some point.

Some sites will just use Site.module for the content entity. I don't think we should force them to enable JSONAPI unless they need to.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Closed as duplicate of šŸ“Œ Fix the issues reported by phpcs Needs work

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

2.x is the new branch. Please rebase the MR.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

Same thing happens when saving a view.

Drupal Config API converts these complex config objects to YAML at some point, storing it or writing it to files.

We should research how that happens and do the same when saving it.

šŸ‡ŗšŸ‡øUnited States Jon Pugh Newburgh, NY

I've removed all of the automated reassignment/deletion of content when a user is deleted.

It's not really content, so I just removed it.

Production build 0.71.5 2024