Skip to content

Category: WebDev

Drush – Segfault fix

TLDR: Delete the node_modules folder!

We’ve been working on standardizing our local environments here at work, and have recently started using Grunt and SASS and some image processing as part of our local Drupal development.

Recently I added a Drush command for us to use to easily get Grunt running from any folder in the docroot. It works great! just a little drush grr and off we go!

It’s a pretty simple, and builds off a lot of work I did making a drush command for us to engage visual regression with BackstopJS. (checks for dependencies, grabs git branch name, passes variable flags into JS) I’ll make a different post about that sometime.

Anyway, since all the grunt files live in the theme folder, the most important part was telling drush where that was, so it we could run npm install, and get everything running locally, including live reload, which is awesome.

We’re still using Drupal 7 and by using :

$path_to_grunt = drupal_get_path('theme', 'mc_main');

Now, we can tell drush where to run grunt for us! Of course, we did need to make sure to change the working directory, so the command would actually run there,

chdir($path_to_grunt);

So then we just run`npm install , with a few checks, and we’re good to follow that up with :

grunt --color

Hooray! right?!


Ok, but then I found running drush on things started crashing my PHP with SEGFAULTS all over the place. ugh!

What was going on? How do I fix it, I just wanted to test our latest release and I’m looking at error logs and …

Ok, after some research, and digging through my bash/zshrc files, and getting some strange errors from the command line after trying to drush updb like :

sh: line 1: 36818 Segmentation fault: 11  /Applications/DevDesktop/php5_5_x64/bin/php /Applications/DevDesktop/tools/vendor/drush/drush/drush.php --php=/Applications/DevDesktop/php5_5_x64/bin/php --backend=2 --root=/Users/me/sites/devdesktop/mcmain-dev/docroot --uri=http://default pm-updatestatus 2>&1
     pm-updatestatus failed.

I mean, what? Why is drush trying to even use php 5_5 at all? where is that setting? (I still don’t know.)

I finally ran across this article: Drupal’s Drush Segmentation fault:11

Arvind explains that when npm install runs on your package.json file and creates the node_modules folder in your theme folder…

Drupal freaks out because many node modules include their own .info files. Drupal is looking for only one .info file per theme to exist.

He provides a solution to add a postinstall line to your package.json to remove all the additional .info files inside the node_modules folder.

but! short term, super simple solution for anyone who is experiencing drush weirdness after running an install on a package.json

Delete the node_modules folder!

At least while you’re trying to run other drush commands, feel free to get your grunt on when you’re done.

The Grid V3 coming soon?

The latest V3 webinar was a bit unfocused. I still have lots of questions, about the software, about the company, but once I had a moment to piece together all the content, I still find myself intrigued. Here’s hoping I get to kick the tires on V3 soon.

The webinar software let us all down with multiple instances of frozen screen sharing, and the presenter could not seem to keep the narrative going in one direction for more than a minute, we did learn quite a bit.

  1. Design improvements
    1. Minimal User interface hides out of your way until you need it.
    2. Improved media management, let the AI change things around, or edit directly.
  2. Secure
    1. Encrypted content creation (not even the Grid company can read what you are creating unless you invite them to a project)
    2. Encrypted swarm – real time collaboration
  3. Speed
    1. WebGL based code is faster to display on all devices and much faster for the AI to juggle variations.
    2. Convenient new integration services like Unsplash help you gather creative commons, copyright free images directly.
  4. Social
    1. Screen recording directly in app lets you share what you see, and trim the video before saving it to your page or the media library.
    2. Real Time collaboration lets you work with friends and coworkers from all around the world at the same time.
  5. Nerd/Developer friendly
    1. An in app editor lets you create new hgml pages or alter parts of an AI created page you’d like to fine tune.
    2. Hopefully, an updated API will be released to allow developers to create and evolve new experiences for the Grid and the Multiverse.

Drupal tips (2)

 #3 Why are blocks being deactivated on my site? Why is my copy site acting strangely?

If you copy an entire site in order to split apart some of its content, make sure you investigate the cache folder and remove any remnant of the previous site cache. There may be a folder for the previous site.

Otherwise, for a little period of time, you’ll be getting some strange behavior that makes it seem like the old site is still hanging around on the new install.

Even if that description didn’t make sense, if you are having strange theme behaviors that flushing the cache, rebuilding permissions and/or a restart don’t seemed to have fixed… check out the cache folder on your server. 

Additionally, if you a splitting a site into two, and intend to use both sites on the same machine, and in the same database instance(ie, two databases on the same machine), make sure you check that the copy site isn’t pointing to any shared folder on the server, ie your cache folder. If somehow, both sites are using the same cache folder, changes on one site may affect the other site.

You are better off changing your site into a multi-site instance, for Drupal 7, because that should mitigate most of these problems. Multi-sites use different cache/files directories unless explicitly sharing modules/themes/frameworks out of the sites/all folder.

#4 git loses track/won’t overwrite settings.php file. (combo drupal + git tip)

error: unable to unlink old 'sites/default/settings.php' (Permission denied)
fatal: Could not reset index file to revision 'origin'.

Repairing/resetting my mac home directory permissions seemed to fix things. ( Resolve issues caused by changing the permissions of items in your home folder )

The Grid – v2 – impressions

Version 2 of the Web Interface to use the Grid is live. as are my struggles to co-exist with Molly, the AI that runs theGrid.

Examples

First, check out 2 grid sites I’ve created:

TLDR:  I’m not happy with v2. 

I’ve been working on this post for almost a year, I don’t want to bother with more screenshots or examples. v3 should be on its way shortly. I’m posting this now so I can compare my v2 thoughts vs v3. I did purchase a lifetime membership, so I haven’t given up on thegrid, fwiw.

To make my art-portfolio grid site present mostly the way I want, I’ve pretty much resorted to just importing Instagram posts.

Checkout my wishlist items for V3 on my second grid site.

~~~~~~

User Interface

The Backend User Interface is… clunky.It does look more polished than the beta version, and has some pretty animated menus, but it’s also less clear on how you and the AI work together to make a page.

!) The new site dashboard wastes a whole screen of real estate.

Large screenshot showing almost nothing above the fold.

 

 

 

 

 

2) Post ordering does not place the latest post at the top, and while you can drag and drop items to move them around, I can see this easily becoming onerous with 3 dozen or so images or posts.  You can actually zoom out the thumbnail views for easier drag and dropping, but there is no only text version to help you.

A little investigation has shown that the AI does not read the content or title of your posts, and no way to force thegrid to sort items on either the backend, or exposed as a feature for the front end.  No way except to drag and drop the articles back in order.

Posts with images in them do tend to stay in the same order as listed.

Search

There is no search option for either the front or backend.

Navigation

There are more navigation varieties this time around, so that’s nice, but rarely surprising.

Some of the options are ones I would never use, so I have to keep hitting redesign until I get one that’s ok.

 

 

Grid Font strangeness

Typography

Typography is strange, sometimes fonts are larger when placed next to similar designed smaller fonts. This example is using 2 links to two separate pages (same thing, shown differently, beside itself)

Additionally, every page load/reload seems to suffer from a CSS Flash of Unstyled content, which means the text/page jumps around a bit until it figures out what font style/sizes should be.

 

Redesign Process

This whole process irks me. We’re asked a series of questions everytime we ask for a redesign.

The Layout: Do you like it?

(where 1-3 means redesign, and 4 and 5 mean…)

The color: Do you like it? 

Choosing 1-2 here will prompt you to choose another color palette

Typography:

Molly.AI is supposed to be able to identify what parts of an image are important. Faces, skylines, or text text should not have text overtop of them, similar rules apply to cropping. This seems to be hit or miss. We used to have a quick key to check to see what part of the image the AI thought was the focus.

I’d be ok if you could at least click on the text overlay and see the original, or uncropped version.

Yes, you do have options to turn off the cropping, overlays and color manipulation. I want to see theGrid do things with the design that I wouldn’t have thought of, colors, layouts, navigation.

I’ve made a wishlist of things I want Molly.AI to be able to do, and put it on my Ghost In The Well grid site, but I’m going to copy it here as well (the flexible updating wishlist will stay on that site.

But, as of now here it is:

Regarding Function

  • Have a media manager, so I don’t need to upload the same image more than once. (confirmed for V3)
  • Iterate designs much faster, allow me to give input.(coming in v3?)
  • Auto pull in feeds of my other sites or social networks. (Instagram/twitter – perhaps into my drafts mode so I can curate later?)
  • Give Molly some initial direction in the purpose of my site. (maybe in v3)
    • Or, enter content and have Molly intuit, summarize and categorize what I may want the direction to be. (this feature may become the clustering idea and may be in v3)
  • Really surprise me
    • Design some crazy bad things
    • Design some crazy good things
  • Allow for tagging of posts
  • Have option to attach the user profile/sig to appropriate article.
  • Date and Time stamps available to be included on the posts.
  • Add Accessibility warnings for color/font choices.
  • Ability to pin certain articles or objects to the top of the homepage
  • Choice of different sizes for headers images/videos (both in app and on site) Currently wasting space ‘above the fold’
  • Ability to merge posts together

Usability:

  • Add settings/preferences for the admin experience. IE color theme/font sizes, animations on or off.
  • Add Revision history. Date/time/last edited by which user information.

Advice for new contractors

Someone contacted me on LinkedIn a little while ago. They had recently been offered a contracting position at a marketing company I had once done some contract work for. They wanted to know about my experience working there.

I replied with some really basic things that new contractors/contractors in general should keep in mind. Then I realized that this information might serve more than just the smart person who reached out to me.

It never hurts to ask for more information. Either you get a response like mine, or a warning to avoid a place, or no response at all. It’s much nicer to know about possible gotchas in a new workplace ahead of time.

Here is my edited response:

Sure, I worked there briefly. The projects were interesting, the people were pretty positive, and the location is awesome.

(Parking was tough, bus or bike recommended)

If you have the opportunity to work there, I’d go for it.

Three caveats:

1) Get requirements in writing, including deadlines, check in weekly to make sure that those things have not changed.

2) Always use version control, even on projects you are the only one working on (crunch time may require more developers/helpers) You don’t want to fight CSS fires in the final hours of a project when you could have avoided it.

3) Make friends with the other developers, designers and PMs (Project Managers). I didn’t have much interaction with them, and feel like that made it more difficult for myself when things got stressful. I could have had more support.

That said, the project manager who set me up on my project left the company shortly after I started There was some communication hurdles around his transition, which caused me all sorts of issues.

It might be consulting 101 but in some places, like this marketing company, these three things were crucial. For me, starting out with 2 & 3 in mind would have made the biggest difference.

Good job on asking questions before accepting offers.

Feel free to use me as a knowledge contact if you need help in the future.

Stacie