Quantcast
Channel: User colan - Stack Overflow
Browsing latest articles
Browse All 43 View Live

Comment by colan on How can I eliminate duplicate Drupal nodes in a View when...

This is an unnecessary workaround. My answer doesn't require something like this.

View Article



Comment by colan on Why would sort fail?

This needs to be added to the documentation. Has anyone already submitted a bug report for that? bugs.php.net

View Article

Comment by colan on How do I check out a specific version of a submodule...

Sigh. After all these years, they still don't have a public issue tracker.

View Article

Comment by colan on Adding modules/themes to a platform after it has been built

Keeping platforms immutable is the best practice. Otherwise, running git pull on sites could lead to them being irreparably broken if there's problem with the code. Also, it doesn't allow for Aegir's...

View Article

Comment by colan on How to ask for CLA signature in merge requests on GitLab?

The feature request for this now appears to be CLA support (#15899).

View Article


Comment by colan on How to change the remote repository for a git submodule?

There's an answer for that below. Please upvote it!

View Article

Comment by colan on Firefox redirects to https

If you're stuck with .dev, you can prevent Firefox from forcing HTTPS with a configuration change.

View Article

Comment by colan on Kibana4 to listen on Port 80 instead of Port 5601

For more context, see Kibana unable to bind port 80 or 443.

View Article


Comment by colan on Displaying the commit tree in github?

GitLab can do this. On a GitLab project page, navigate to Repository -> Graph.

View Article


Comment by colan on Use terraform to create an instance in a specfic...

If you are creating the subnet in TF, you can add a line like uuid = openstack_networking_subnet_v2.SUBNET_ID.network_id to the network block in the instance definition (which isn't documented anywhere...

View Article

Comment by colan on Becoming non root user in ansible fails

I've been setting this in a set_fact immediately before the task at hand, and then unsetting it immediately afterwards. Seems like the best way to minimize exposure in a low-risk environment.

View Article

Comment by colan on Get the full path of the symlink target in Ansible

There's some discussion on this at stat module doesn't return lnk_source when follow=yes.

View Article

Comment by colan on Capture Terraform provisioner output?

This is a great solution whenever possible, but it's not always. For example, Rundeck API tokens can only be generated.

View Article


Comment by colan on Terraform different backend for each project

All workspaces use the same state backend so does this actually work? It looks like you're setting up different buckets here. I believe you'd only need one.

View Article

Answer by colan for Run rule only if workflow state changed to XYZ

You should be able to use Rules without writing your own integration code as the Workflow Rules module, bundled with Workflow, does this.

View Article


Answer by colan for Creating multipe page.tpl for different page groups in...

You can use the Context module.Within a given context, you can add the "Template suggestions" reaction. This will allow you to specify additional template files that will override the defaults. See the...

View Article

Answer by colan for Controllling Drupal's active/active-trail with duplicate...

Multiple Node Menu might do the trick:This module modifies the "Menu settings" in standard node editing form to allow managing multiple menu links to a node. The Drupal standard behavior is to only...

View Article


Answer by colan for Call a REST API in PHP

Use Guzzle. It's a "PHP HTTP client that makes it easy to work with HTTP/1.1 and takes the pain out of consuming web services". Working with Guzzle is much easier than working with cURL.Here's an...

View Article

Answer by colan for Netbeans, xdebug : start debugging from browser

It's not necessary to modify your form code to enable debugging, as suggested by another answer here.Go to Project Properties > Run Configuration > Advanced... > Debug URL and check "Do not...

View Article

Answer by colan for Drupal OAuth Service Module

For OAuth2, there's OAuth2 Server. OAuth is for OAuth1.The corresponding client for OAuth2 is OAuth2 Client.

View Article

Answer by colan for Can OAuth 2 be used for SSO? Or do I need a more...

In general, you shouldn't be relying strictly on OAuth2 for authentication as OAuth2 is an authorization mechanism, not an authentication mechanism. Though, if you're stuck with it, and you understand...

View Article


Answer by colan for What max_connection should I set for MySQL?

This is dependent on the amount of memory you have and how your other settings are configured. There's a MySQL Calculator you can use for this.

View Article


Answer by colan for Drupal 7 Views: Term filter with relationship

Use the patch over at https://www.drupal.org/node/1492260 for autocomplete.A select list should work the same way as with this patch, but it's built-in. In either case, you have to enable it by...

View Article

Answer by colan for Can you Create your Own Hook in Drupal?

For Drupal 6 & 7, drupal_alter() is probably the best option.As stated in the module_invoke_all() documentation,All arguments are passed by value. Use drupal_alter() if you need to pass arguments...

View Article

Answer by colan for Drupal 8: delete all nodes of the same type

One should use entity queries instead of acting directly on the database: $result = \Drupal::entityQuery('node') ->condition('type', 'my_content_type_name') ->execute();...

View Article


Answer by colan for drupal 8 how to create nodes with multiple values

See How to set value for multivalue field in drupal 8 programmatically.I tried marking this as a duplicate, but that's only allowed if on the same site. The other question is on Drupal Answers, not...

View Article

Answer by colan for Drush site-install dkan fails - "All parts of a PRIMARY...

You need to look at which table MySQL is attempting to create as shown here:#2 /Users/Nicholas/dkan/webroot/includes/database/schema.inc(664): DatabaseConnection->query('CREATE TABLE {p...')Once you...

View Article

Answer by colan for Chaining a constructor with an object function call in PHP

This is possible as of PHP 5.4+:Class member access on instantiation has been added, e.g. (new Foo)->bar().

View Article

Answer by colan for Delete entity under some conditions Drupal 8

Use the entity storage's delete() method to delete multiple entities. There's no need to iterate over all of them.$query = \Drupal::entityQuery('taxonomy_term');$query->condition('vid',...

View Article



Answer by colan for Which parts of the client certificate to use when...

I decided to concatenate the issuer name, a delimiter |, and the DN.Hopefully, this solves the problem of using serial numbers which change on renewal.

View Article

Answer by colan for Aegir external API

You're looking for Aegir Services:Aims to be a one-stop shop for all Web services functionality offered within the Aegir Hosting System. It allows for remote site management via the Services framework.

View Article

Answer by colan for drupal 8 views date range filter - 'is between' operator...

I believe you're going to need the Views Date Filter Datetime Granularity Option patch (until it gets committed) as well as the change from The Views integration Datetime Range fields should extend the...

View Article

Answer by colan for Is there a custom module to drag and drop files in drupal 8?

Work is being done directly in Drupal 8 core. All efforts should be directed there so that contrib/custom modules are not necessary for this purpose.See File Field design update for details.

View Article


Answer by colan for Drupal-project requires Composer version 1.0.0 or higher

Upgrade your system to Ubuntu 18.04 (bionic), where the Composer version is >= 1.0.0.

View Article

Answer by colan for How to keep ansible role from running multiple times when...

Assuming you're using import_role and/or include_role, until Include_role loop installs role and dependencies multiple times gets fixed, I'd recommend the following:Don't specify your dependent roles...

View Article

Answer by colan for How can I eliminate duplicate Drupal nodes in a View when...

The problem is that the records actually are distinct from a database perspective as there are multiple records generated by different entity references.The Drupal 8 core issue for this is Views...

View Article


Answer by colan for include_tasks does not work with become after upgrade to...

You should be able to simply add these to the variables list that you pass in (with the ansible_ prefix). So that would be:- name: Install API software include_tasks: utils/install_service.yml vars:...

View Article


Answer by colan for Azure CLI query help - JMESPath - filter using key having...

This is a totally different context, but just in case it helps somebody, the author's solution didn't work for me doing a JSON query from Ansible (which also uses JMESPath). Instead, I had to do the...

View Article

Answer by colan for Assign domain name to a floating ip

See SysEleven's How to set up DNS for a Server/Website.It walks you through the process of:Creating the zone,adding the DNS record, and finallymaking the zone authoritative in global DNS.It assumes you...

View Article

Answer by colan for Display banner message in Ansible

The other answers here didn't work for me because all lines got concatenated together (no matter what I tried), which wasn't readable.The solution was to use the Pause module, as discussed in an answer...

View Article

Answer by colan for Aegir upgrade step on ubtunu 18.04

While the official upgrade guide doesn't mention it, most of us do the following (as it's the safest):Set up a new clean Aegir installation on a new VM.Remotely import your sites by enabling the Remote...

View Article


Answer by colan for Handling Openstack provider credentials in Terraform...

You can also prompt the user for these things, as I mentioned in https://github.com/hashicorp/terraform/issues/13022#issuecomment-819658436:# You can set other TF variables in here as well.echo "Please...

View Article

Answer by colan for Drupal 8 restresource: No route found

As per REST and Application Integration:The content type for the data you send, or the accept type for thedata you are receiving, must be set to 'application/hal+json'.So the following steps are...

View Article

Browsing latest articles
Browse All 43 View Live




Latest Images