Profile

Scrapbook photo 1
Scrapbook photo 2
Scrapbook photo 3
Scrapbook photo 4
Scrapbook photo 5
Scott Sawyer
Works at Scott Sawyer Consulting, LLC
Attended Southern Polytechnic State University
241 followers|342,172 views
AboutPosts

Stream

Scott Sawyer

General Discussion  - 
 
This is the first time I've done this, so maybe someone with some experience can help me. I made a Drupal 8 port of the Bitly For Drupal module ( https://www.drupal.org/project/bitly ),

I created a sandbox ( https://www.drupal.org/sandbox/scottsawyer/2845808 )

I am trying to follow the instructions here: https://www.drupal.org/contrib-8x-sandbox

When I get to the step `git checkout -b scottsawyer-8.x-1.x remotes/bitly/8.x-1.x`, I get

"fatal: Cannot update paths and switch to branch 'scottsawyer-8.x-1.x' at the same time.
Did you intend to checkout 'remotes/bitly/8.x-1.x' which can not be resolved as commit?
"

So, obviously I am doing it wrong. I just don't know what I am doing wrong :)
1
Bhavin Joshi's profile photo
2 comments
 
On https://www.drupal.org/contrib-8x-sandbox, check steps 3 to 8 again.
Add a comment...

Scott Sawyer

General Discussion  - 
 
Has anyone used the Key module? https://www.drupal.org/project/key

Specifically, have you used it in a D8 project? I'd like to store API keys with it, but I haven't seen any good documentation. The info in the README is pretty sparse. 
Key provides the ability to manage keys, which can be employed by other modules. It gives site administrators the ability to define how and where keys are stored, which allows the option of a high level of security and allows sites to meet regulatory or compliance requirements. Examples of the types of keys that could be managed with Key are:
1
Phil Ward's profile photoAlexei Rayu's profile photoScott Sawyer's profile photo
4 comments
 
Yeah, so any third party API key. Specifically I want to store bitly keys. But on any given site, you have any number of private API keys. Storing in the database doesn't seem like a good idea, and storing in config seems worse.
Add a comment...

Scott Sawyer

Tutorials\How To?  - 
 
Does anyone know of a quick/ easy way to bypass the system update wifi only restriction? I can't download a security update even though I have unlimited mobile data. Which is stupid. I thought Android was about choice.
2
Andrew Jones-McGuire's profile photoScott Sawyer's profile photo
13 comments
 
Again, so arbitrary, you can't install over mobile data, but you can use your hotspot to download over mobile data. Jackasses.

I really don't think the glitching is a real issue, I mean, it could be if your connection isn't good, but if it makes 3 attempts and fails, it should start over. This has been worked out, I download 100mb, 300mb PDFs several times per week. It could download in the background. It could ask "if i'm sure I want to use cellular."

Any way, I guess bitching about it won't change things. The manufacturers don't care, they think we're lucky to get an update at all.


Add a comment...

Scott Sawyer

General Discussion  - 
 
Has anyone tried migrate_source_csv? I am struggling to get it to work correctly, filed a support request on d.o. Would love some help figuring out what I am doing wrong. https://www.drupal.org/node/2840011
1
Lucas Hedding (heddn)'s profile photoScott Sawyer's profile photo
2 comments
 
Hey +Lucas Hedding​, I didn't know you were on here, probably would have skipped d.o if I knew.

I did see your response, thank you. I did respond to you that I made that change, but I still get the same error. If there is some other information I could supply that might help diagnose the issue, I am happy to give whatever I can.

The point of this migration is for me to learn about D8 migrations. This is just my personal blog with only 40-50 entries, so migration is really overkill, but I want to learn.

As I mentioned, I am getting two different errors, one one the blog import, the other on photo import. The photo import just says my source keys aren't an array, but it looks like an array to me. Sort of frustrating. 
Add a comment...

Scott Sawyer

General Discussion  - 
 
I am trying to learn a JS framework to use with Drupal via rest, but I am getting caught up in Drupal / server configuration. Spending way too much time trying to figure this out, maybe someone with some experience here could help me so I can get back to learning the "stuff"?

Essentially, I have a VPS, nginx with two vhosts, one on port 9080, the other 8080.

I have drupal 8, restful, hal, and serialization enabled and a basic restful export view set up. When I go to the view URL in the browser, I see JSON. Perfect. This is on port :8080

On port :9080, I have my little Vue.js app that I am building to learn. Vue.js is pretty nice actually. So, in my Vue.js app, I am trying to pull that view data from :8080.

So, first off, I run into the whole CORS thing. I spent several hours trying to find good information on how to set this up in nginx, eventually went with this guy's script: https://gist.github.com/agouriou/735daacf7530675552ff248f319a07d9


But now I get 404 when I try to hit that URL from the app. I have tested using curl, and this little Advanced REST client app for chrome, and half a dozen online CORS checkers. I am getting different results from different places, but the one I care about, the app, is not working.

Using the Advanced REST client, I get 200 OK, and I see the stream of data.

In curl, with the command:
$ curl -H "Origin: http://xxx.xxx.xxx.xxx:9080" --verbose http://xxx.xxx.xxx.xxx:8080/api/getImages

* Trying xxx.xxx.xxx.xxx...
* Connected to xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) port 8080 (#0)
> GET /api/getImages HTTP/1.1
> Host: xxx.xxx.xxx.xxx:8080
> User-Agent: curl/7.47.0
> Accept: /
> Origin: http://xxx.xxx.xxx.xxx:9080
>
< HTTP/1.1 404 Not Found
< Server: nginx/1.10.0 (Ubuntu)
< Date: Thu, 22 Dec 2016 08:33:50 GMT
< Content-Type: text/html
< Content-Length: 178
< Connection: keep-alive
< Access-Control-Allow-Origin: http://xxx.xxx.xxx.xxx:9080
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
< Access-Control-Allow-Headers: Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With
< Access-Control-Expose-Headers: Authorization


I also installed the CORS drupal 8 module, I don't have any idea if that is set up right.

I feel like there is this chunk of knowledge I am missing, that I don't really care about, can't really find a way to get through to get back to the thing I care about.

If you have any experience and know of a really good tutorial on how to get this working, please share. I probably need to take this to stackexchange, but I always get yelled at over there.

1
Scott Sawyer's profile photoNia Kathoni's profile photoJonah Brown's profile photo
7 comments
 
+Scott Sawyer​ yeah rest had my head scratching. Wanted to get a windows app talking to a Drupal. My own fun venture. Still learning.
Add a comment...

Scott Sawyer

Share Knowledge  - 
 
Finally found my Drupal camp video. It's pretty rough, had to use a windows computer which threw me off.
6
Scott Sawyer's profile photoBilly Gordon's profile photo
3 comments
 
It'll get easier. You're off to a great start!
Add a comment...

Scott Sawyer

General Discussion  - 
 
Drupal 8 module development question:

I am creating a Bit.ly module to shorten URLs. I want to expose a "function" to allow other modules to use my module ( pass in a URL to be shortened with the Bit.ly API ).

I think I want to create a "service" that other modules can use. Is this the correct methodolog? Do I need a service container?

I am trying to find a good example of that sort of workflow. I am looking at these two tuts: https://lakshminp.com/writing-your-first-drupal-service, http://www.titancloudworks.com/captains_log/post/drupal-services-at-your-service

What I am not seeing in these tutorials:
1 - How another module would call my service and pass in an argument ( the URL to be shortened in my case. ( $bitly_url = \Drupal::service('bitly.shorten')>getBily($url); maybe?)
2 - How, once I get that argument, I can process it with my module. ( I don't think I want all of my api called in the service controller )

Another topic I haven't really gotten to, but it will come up, if another module doesn't want to depend on my module, but would like to use it if it's available, how would I go about doing that? Right now I have something like this:

$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler>moduleExists('bitly')) {
// do something
}

Is that really a good way to manage "optional" modules?
Get the most out of your social and online marketing efforts. Own, understand and activate your best audience through the power of the link with Bitly Enterprise.
2
Alexei Rayu's profile photoScott Sawyer's profile photoHR Joshi's profile photo
32 comments
 
You are right. You can not migrate away from Drupal7 instantly, You have to consider all the aspects. We have been working on Drupal8 projects since a year and a half. Completed two projects and working on the third.

If you need help with Drupal8 or looking for extra experience resources, We can help you with that too.
Add a comment...

Scott Sawyer

General Discussion  - 
 
I am trying to develop a module and have some technical debt ( I don't know what I'm doing ). I want to use an external PHP library, the library is on packagist. I created a composer.json, required the package, ran composer update and the package was added to /vender.

Not I want to write my module which will use this library ( package ). The package documentation says to require the /vender/package/autoloader.php, but that doesn't seem like the correct way ( or Drupal way ) to use it. Maybe I'm wrong.

What is the recommended way to use the library in my module?
1
Nia Kathoni's profile photoScott Sawyer's profile photo
7 comments
 
I just wanted to post back and let you know that your help was extremely useful. I am able to use the library in my module.
Add a comment...

Scott Sawyer

General Discussion  - 
 
How can I download / install system update over mobile data? I have unlimited data and don't want to hunt around for public wifi just to download a stupid update. Pisses me off, I thought Android was about choice.
2
Nalin Kariyawasam's profile photoElison Niven's profile photoScott Sawyer's profile photo
11 comments
 
Yeah, never had that option.
Add a comment...

Scott Sawyer

Questions  - 
 
What's a good, lightweight gallery plugin recommendation? Nothing fancy, but maybe some configurability. 
6
Gaurav Pareek's profile photoScott Sawyer's profile photoJason Robinson's profile photo
5 comments
 
My website is heavy on photos. I searched for a photo gallery for about three months, trying most of the highest ranking galleries. I settled on FooGallery as it met all of my needs. I eventually purchased the pro version, mainly to support the dev.
Add a comment...

Scott Sawyer

General Discussion  - 
 
I am experimenting with a JavaScript app (Vue.js), I hope to eventually be able to package it as a native app for end users . There will be a single entity that gets updated by the user via the app and what I am trying to get my head wrapped around is authentication. My thoughts are to allow the users to use their Google account on their device and offer a fallback if they don't have a Google account. I feel like most users would use the website for account creation and just use the app for convenience, so I really don't want them to have to authenticate but one time on their device.

I know their is an oauth2 module that is supposed to work well with restful, but I haven't really seen any good guides or blog posts on how people are using restful / auth in apps. Does anyone have experiences or resources they could share?
3
Jonah Brown's profile photoAlexei Rayu's profile photo
2 comments
 
Sounds very interesting!

Add a comment...

Scott Sawyer

Share Knowledge  - 
 
FYI, this guy's videos are helping me a lot with Vue js, https://www.youtube.com/watch?v=CWi8MnslsUQ
6
2
Jonah Brown's profile photoScott Sawyer's profile photo
4 comments
 
FYI, if you want to use vue-cli template and Vuejs 2 ( I highly recommend both ), this guy's tutorial is a bit more up to date. He's using Laravel, but I really need more help with the Js anyway
Add a comment...
Work
Occupation
Website Design and Development
Skills
Drupal, WordPress, PHP, MySQL, Front-End Development
Employment
  • Scott Sawyer Consulting, LLC
    Owner, 2005 - present
Basic Information
Gender
Male
Links
Contributor to
Story
Introduction
I like to build stuff.  Mostly Websites, but you know, stuff.
Education
  • Southern Polytechnic State University
    Information Technology, 2005
Contact Information
Work
Phone
+1 404-631-6216
Email