Turning complexity into clarity.

AEM Developer (Intermediate) - CGI - Vancouver, BC

Drupal Jobs from Indeed - Fri, 10/13/2017 - 00:27
• Experience with other Web Content Management Systems such as WordPress, Drupal, Kentico, or Interwoven. The Adobe Experience Manager (AEM) Developer will be...
From CGI - Fri, 13 Oct 2017 00:27:49 GMT - View all Vancouver, BC jobs
Categories: Drupal

Implement new website design with Wordpress - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 22:52
Looking for a Wordpress expert to develop a website redesign for nexla.com. The new site will be approximately 8 pages. The design is completed by our in-house designer who can send sketch files, all images, etc. The attachment is the design I need implemented.

There is no e-commerce. There are several plugins we use, such as form 7, and integration with Hubspot to collect email addresses and forms to download content. Other needs:

-Responsiveness (mobile, retina display, macbook air…)
-SEO optimization
-Quick load times

Looking to ship this by the end of October. Existing template is Scalia, however we're open to changing it.


Posted On: October 13, 2017 04:11 UTC
Category: Web, Mobile & Software Dev > Web Development
Skills: CSS, CSS3, HTML, JavaScript, PHP, Web Design, Website Development, WordPress
Country: United States
click to apply
Categories: WordPress Maintenance

E-Commerce Master - English/Spanish Bilingual (Required) - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 22:11
E-Commerce Master- English/Spanish Bilingual (Required)
We are looking for a E-Commerce Master that can quickly apply a Wordpress theme, mimic the design concept we provide, input all imagery/content, and ensure it is a fully responsive site for ALL devices.
Requirements/Qualifications :
• Must be well-versed in creating a Wordpress (2+ years experience) - applying a theme and create the design based on our design concepts.
• Bilingual in English and Spanish (required) as will be building a site in Spanish and English.
• Must be able to work on fast-pace, deadline driven projects.
• Must be readily available to communicate with our team in our Pacific Time Zone PST UTC-08:00
• An understanding of current UI/UX standards and processes.
• Proficiency in JavaScript, HTML5, PHP, CSS, (incl. jQuery)
• Proficiency in Photoshop and PSD to Wordpress.
• Must understand all best practices of responsive design and be able to create a full responsive site compatible with ALL devices.
Bonus Skills
• Experience with Amazon Web Services
• Experience with Web Design
• Knowledge of SQL/MySQL
•      Experience with Magento or any E-Commerce Platform


Posted On: October 13, 2017 04:11 UTC
Category: Web, Mobile & Software Dev > Ecommerce Development
Skills: 1ShoppingCart, CSS, CSS3, Ecommerce Platform Development, HTML, HTML5, JavaScript, jQuery, Magento, PHP, Web Design, Website Development, WordPress
Country: United States
click to apply
Categories: WordPress Maintenance

Website Build - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 20:35
Need someone to copy of a website that we had worked on the develop but now the developer is trying not to launch it after all our content and work has been complete

This job was posted from a mobile device, so please pardon any typos or any missing details.


Posted On: October 13, 2017 13:41 UTC
Category: Web, Mobile & Software Dev > Web Development
Skills: CSS, CSS3, HTML, HTML5, JavaScript, jQuery, PHP, Web Design, Website Development, WordPress
Location Requirement: Only freelancers located in the United States may apply.
Country: United States
click to apply
Categories: WordPress Maintenance

wordpress home page - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 19:36
I just want one page created-a home page. All the  tabs are already there. I have all the content, all the pictures, I just need someone to put it together. I actually have had 3 people already put three home pages together for me- in wordpress.
I can't use any of them because google wants my wording different.
So I need a new home page, but you can copy and paste everything you need from those three to put into one. If you can do this how many hours do you think it will take? Thanks so much!!!


Posted On: October 13, 2017 04:11 UTC
Category: Design & Creative > Presentations
Skills: Web Design, Website Development, WordPress
Country: United States
click to apply
Categories: WordPress Maintenance

Texas Creative: Drupal and Wordpress and Joomla, Oh My!

News from Planet Drupal - Thu, 10/12/2017 - 16:32

Not all CMS are created equal. Before building your next website, here are a few tips on why your CMS choice matters. (Plot twist: as told by an Account Manager.)

Read More
Categories: Drupal

Word press homepage design - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 16:31
Hi, I am looking for a creative WordPress designer with a proven history to work only on my home page design. The website is a dating social networking site. That will boast a very nice graphic uncluttered content across the main page. The designer will need to be available for work immediately and be willing to complete this task in a short amount of time. Please only apply if you have read and understood the terms of this job post. I look forward to hearing from you! ??


Posted On: October 12, 2017 18:11 UTC
Category: Web, Mobile & Software Dev > Web Development
Skills: CSS, HTML, Web Design, Website Development, WordPress
Country: United States
click to apply
Categories: WordPress Maintenance

Add scanned content to wordpress theme - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 15:57
I have 40 pieces of content that have been scanned and need to be added to an ìncomplete wordpress theme to populate the website.

Each piece describes a trainer and their lessons and a snippet needs to be taken from each to create a separate entry and snippet for each trainer and class.

Most are on A4, some are long, some are short, some are typed so OCR could be used, some are handwritten.

The wordpress theme is the Meridian one in gym layout, and you will need to learn the theme to add the content correctly.

This job was posted from a mobile device, so please pardon any typos or any missing details.


Posted On: October 12, 2017 18:11 UTC
Category: Writing > Web Content
Skills: Content Writing, WordPress
Country: United Kingdom
click to apply
Categories: WordPress Maintenance

Integrate our product (report) into our webpage via email link and then take them on a journey with intercom - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 15:10
Need help to integrate a sample of our product (which is a Report) into our wordpress site which is accessed when a user enters in their email, from there we will send the user several automated emails with call to actions to sign up to our product.

We are needing the word press site plugged into the intercom system so you need to have had experience with this product. We will need a marketing professional that can map our customers journey, draw up and design intercom emails, landing pages, copy and design.

We have a heap of work going forward so after this first milestone is done we will be looking to find an on going marketing person, they would need to be transparent and upfront. They will also need to be good with have experience in the following; SEO reporting and improvements, key work analysis, content link building and give suggestions to help improve every step along the way.


Posted On: October 12, 2017 18:11 UTC
Category: Sales & Marketing > Email & Marketing Automation
Skills: Intercom, Landing Pages, Marketing Strategy, SEO Audit, SEO Backlinking, SEO Keyword Research, SEO Writing, WordPress
Country: United Kingdom
click to apply
Categories: WordPress Maintenance

[HELP] WP Plugin - The Events Calendar

Talk about plugins - Thu, 10/12/2017 - 14:46

I took over maintenance of a WordPress site. The company that developed the site programmed a function to import events from this URL into The Events Calendar Plug-in by Modern Tribe. http://www.artshound.com/?syndicated_data&apid=43005&aplang=eng&apoutput=xml Problem is, it has stopped working.

2nd issue I have with the site is that phantom images pop up in my media library. These look like replicates of old image galleries. Problem is that there are hundreds of those images. I delete them when I notice them, but they keep coming back. The same company created the function to add the galleries. I deleted them and replaced it with a different gallery plug-in in an attempt to solve the problem, but the phantom images keep popping up. I suspect it's related to the event import that's why I post this as one project. Does anyone have any suggestions on here for this?

Any help is appreciated.

submitted by /u/abeezy_here
[link] [comments]
Categories: WordPress Maintenance

Ultimate Member + Facebook Data - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 14:39
Hi there,
We are currently building a website with the Ultimate Member plug-in suite used at the backend for our community.

We want someone to extend the functionality of the Facebook social login to allow for the capturing of more user data than just name and email address. Ideally we would like to capture ALL available information that Facebook provides, including state/region, page likes, friends lists - pretty much anything we can get our hands on.

This data will then be saved against the Ultimate Member user profile and used to tailor their on site experience and to alert them when we have new content that is relevant to their interests.

We look forward to reviewing your proposals.

Thanks,
Sebastian


Posted On: October 12, 2017 18:11 UTC
Category: Web, Mobile & Software Dev > Web Development
Skills: CSS, jQuery, MySQL Administration, PHP, Website Development, WordPress, Wordpress Plugin
Country: Australia
click to apply
Categories: WordPress Maintenance

Vardot: SEO Checklist Before Launching Your Drupal Website

News from Planet Drupal - Thu, 10/12/2017 - 14:11
SEO Checklist Before Launching Your Drupal Website Dmitrii Susloparov Thu, 10/12/2017 - 17:11

Search Engine Optimization (SEO) might not be the first thing you think of when designing a new website, but building an optimized framework from the start will help you drive traffic to your site and keep it there. With our Drupal SEO-checklist in hand you can build an excellent website that draws customers from launch day. Briefly speaking, here is a bullet list of what to check before the launch day. Below we’ll speak about each point in more detail.

 

  • Check that all web pages have unique titles using the Page Title module

  • Check if XML Sitemap and Google News Sitemap are configured properly

  • Check if Redirect module is enabled and configured

  • Check if Global Redirect module is enabled and configured

  • Check that .htaccess redirect to site with/without www

  • Check that the homepage title includes a slogan, and is descriptive for the function of the site

  • Check if Meta Tags is filled with descriptive information

  • Check that OG tags are filled correctly and with descriptive information.

  • Check if site's information appears well when shared on Facebook

  • Check if Path aliases patterns are meaningful

  • Check if Google Analytics is enabled and configured

  • Check if Page Title module is enabled and configured

  • Check if Google News Sitemap is enabled and configured

  • Check if Site verification is enabled and configured

  • Check if Search 404 module is enabled and configured

 

Drupal SEO: 12 Things that Will Improve Your Site's Ranking Check that all web pages have unique titles...

...and make sure to write them correctly. All of your pages should be easily identifiable to the end user. Not only should they have unique titles, they should have meaningful titles. Having multiple pages with the same titles (like “Get in touch”, “Contact us” and “Make a booking”) will simply confuse your end users and search engine crawlers.

 

Not only do good page titles help customers who are already on your site, but they help with social sharing, and picking your site out of search engine results. Titles are the first element that any user will see, whether they come directly to your site, find it in a search engine, or see it shared on social media.

 

Writing good titles is extremely important, and having keywords in your title that match a user's search greatly improves the chances of them clicking on your page.

 

Ensuring all your pages have a unique name will help users navigate, boost your SEO ratings, and increase the chances that someone will type the right keywords into a search engine to bring them to your site.

 

You can set up unique page titles much easier if you install the Drupal Page Title module.

10 Drupal Modules that Will Boost Your Website’s SEO

 

 

Check if XML Sitemap and Google News Sitemap are configured properly

The XML Sitemap module creates a robot friendly map of your site that Google and other search engines can crawl to categorise your website. There are a few settings you can alter for your site at admin/config/search/xmlsitemap and you can view the sitemap from http://yoursite.com/sitemap.xml.

 

You should configure XML Sitemap early in your site build for the best effect, but you can also alter the settings later on if needed.

 

Google News Sitemap offers a similar but different service that creates a Google specific map - as suggested in the name. These two modules work nicely side by side to make your site easy for search engines to crawl and index.

 

Please note that if your site contains AMPs, there is no need to create sitemaps for them. The rel=amphtml link is enough for Google to pick up on the accelerated mobile page version, which means you can easily gain traffic from Top Stories carousels and mobile search. Creating AMP on your Drupal site became easy with our step-by-step guide.

 

 

Check if Redirect module is enabled and configured

Redirect is a handy module for making sure users always make it to your site. It uses case-insensitive matching to help catch broken links with redirects and tracks how often users are hitting those redirects. You can use redirects to capture any broken links, set up promotional links, or simply capture typos users are entering when trying to access your site.

 

Check if Global Redirect module is enabled and configured

If you’re using Drupal 8 you can skip this one because the functionality has been rolled into the redirect module. Otherwise install Global Redirect to work in tandem with Redirect to catch any broken links. Global Redirect will test all links with and without a trailing slash, ensure links are case-insensitive and if a link is truly broken it will return a user to your home page, rather than an ugly 404 page that decrease the position of your site in SERPs.

Check that .htaccess redirects to site with/without www

Some users attempting to visit your site will navigate to www.yoursite.com, while others will simply type yoursite.com. By setting up your site to handle either request you can be sure you won’t miss any visitors.

 

 

Check that the homepage title includes a headline, logo and primary image and is descriptive for the function of the site

The headline as well as the slogan represent who you are as a business. Make your first impression a good one as this will also be visible on search engines. This is a good opportunity to stack your website with SEO friendly keywords, but don’t go overboard and sacrifice your image for it - keyword stuffing may not only decrease the trust index of your site, but also its conversion rates.

Ensure Metatags are filled with descriptive information

Writing SEO-optimized metatags is highly important, because they remain one of the top on-page ranking factors. Make sure to install the Metatag module on your site to have an easy, user friendly interface for updating metadata. With the module installed you can easily populate metadata with keywords, page descriptions, and more.

 

SEO tips for your Drupal site

 

The Metatag module will also give you extra control over how your site appears when shared on Twitter or Facebook.

Check that OG tags are filled correctly and with descriptive information.

OG tags are metatags specifically designed to ensure your site communicates nicely with Facebook. By setting these tags correctly you will be able to control exactly how your site appears on Facebook, including what images and what taglines are used.

Check if site's information appears well when shared on Facebook and Twitter

After configuring the metatag module and OG tags, pop over to Facebook and make sure that your site shares the way you would like it too. It’s important to test this out now before users start sharing your site around.

 

Similarly try tweeting a couple of your pages to see how well your Twitter Cards come through. If you don’t want to show your site to your audience until you are sure it is set up properly, you can check Twitter Cards using the Card Validator.

 

For more information on configuring Twitter cards, check out the Twitter user guides.

 

Check if Path aliases patterns are meaningful

By default Drupal will set your URLs to node/123 - while this works great for the database back end, it doesn’t work well for your end users, or for search engines.

 

You can use the Pathauto module to create rules and patterns for your URLs that will significantly cut down on your maintenance times and simplify your site navigation.

Check if Google Analytics is enabled and configured

While having Google Analytics configured won’t improve your SEO, it will give you all the data you need to understand where your users are coming from and how they behave once they hit your site.

 

Installing the Google Analytics module makes setting up and configuring Google Analytics a breeze.

Check if Site verification is enabled and configured

The Site verification module makes it easy to check the boxes that tell search engines that your site is truly yours. Having your site verified will improved how search engines crawl your site, and for Google will allow you to access private search data. With site verification you will receive better data and better search engine rankings for just a few minutes work.

 

Check if Search 404 module is enabled and configured

The Search 404 module is a saving grace for reducing your bounce rate, your SEO and improving your customer experience. Instead of your users finding an ‘Error: Page not Found” in place of the content they were hoping for, they will be offered a search of your site based on the URL string. For example if “www.yoursite.com/great-seo-tips” doesn’t exist, users this module will automatically search your site for ‘Great SEO tips” and show the users the results.

 

 

Bottom line

While SEO may seem like a tricky subject to wrap your head around, the basics are easy with the right modules and the right guidance. Drupal is a great content management system for building search engine optimized websites.

 

With our SEO checklist you can get off on the right foot, and here at Vardot we love educating our customers to build top quality websites. If you’re looking for even more ways to improve your sites SEO, have a look at SEO articles in our blog or get in touch with us.

Categories: Drupal

Lullabot: Incredible Decoupled Performance with Subrequests

News from Planet Drupal - Thu, 10/12/2017 - 13:52

In my previous post, Modern Decoupling is More Performant, we discussed how saving HTTP round-trips has a very positive impact on performance. In particular, we demonstrated how the JSON API module could help your application by returning multiple entities in a single request. Doing so eliminates the need for making an individual request per entity. However, this is only possible when fetching entities, not when writing data and only if those entities are related to the entry point (a particular entity or collection).

Sometimes you can solve this problem by writing a custom resource in the back-end every time, but that can lead to many custom resources, which impacts maintainability and is tiresome. If your API is public and you don’t have prior knowledge of what the consumers are going to do with it, it’s not even possible to write these custom endpoints.

The Subrequests module completes that idea by allowing ANY set of requests to be aggregated together. It can aggregate them even when one of them depends on a previous response. The module works with any request, it's not limited to REST or any other constraint. For simplicity, all the examples here will make requests to JSON API.

Why Do We Need It?

The main concept of the Subrequests module is that instead of sending multiple requests to your Drupal instance we will only send a single request. In this master request, we will provide the information about the requests we need to make in a JSON document. We call this document blueprint.

A blueprint is a JSON document containing the instructions for Drupal to make all those requests in our name. The blueprint document contains a list of subrequest objects. Each subrequest object contains the information about a single request being aggregated in the blueprint.

Imagine that our consumer application has a decoupled editorial interface. This editorial interface contains a form to create an article. As part of the editorial experience, we want the form to create the article and a set of tags in the Drupal back-end.

Without using Subrequests, the consumer application should execute the following requests when the form is submitted:

  • Query Drupal to find the UUID for the tags vocabulary.
  • Query Drupal to find the UUID of the user, based on the username present in the editorial app.
  • Create the first tag in the form using the vocabulary UUID.
  • Create the second tag in the form using the vocabulary UUID.
  • Create the article in the form using the user UUID and the newly created tags.

We can query for the user and the vocabulary in parallel. Once that is done, and using the information in the vocabulary response, we can create the tag entities. Once those are created, we can finally create the article. In total, we would be making five requests at three sequential levels. And, this is not even a complex example!

undefined

A JavaScript pseudo-code for the form submission handler could look like:

console.log('Article creation started…'); Promise.all([ httpRequest('GET', 'https://cms.contentacms.io/api/vocabularies?filter[vid-filter][condition][path]=vid&filter[vid-filter][condition][value]=tags'), httpRequest('GET', 'https://cms.contentacms.io/api/users?filter[admin][condition][path]=name&filter[admin][condition][value]=admin'), ]) .then(res => { const [vocab, user] = res; return Promise.all([ Promise.resolve(user), httpRequest('POST', 'https://cms.contentacms.io/api/tags', bodyForTag1, headers), httpRequest('POST', 'https://cms.contentacms.io/api/tags', bodyForTag2, headers), ]) }) .then(res => { const [user, tag1, tag2] = res; const body = buildBodyForArticle(formData, user, tag1, tag2); return httpRequest('POST', 'https://cms.contentacms.io/api/articles', body, headers); }) .then(() => { console.log('Article creation finished!'); }); Using Subrequests

Our goal is to have JavaScript pseudo-code that looks like:

console.log('Article creation started…'); const blueprint = buildBlueprint(formData); httpRequest('POST', 'https://cms.contentacms.io/api/subrequests?_format=json', blueprint, headers) .then(() => { console.log('Article creation finished!'); });

We've reduced our application code to a single POST request that contains a blueprint in the request body. We have reduced the problem to the blueprint creation. That is a big improvement in the developer experience of consumer applications.

undefined Parallel Requests

In our current task we need to perform two initial HTTP requests that can be run in parallel:

  • Query Drupal to find the UUID for the tags vocabulary.
  • Query Drupal to find the UUID of the user based on the username in the editorial app.

That translates to the following blueprint:

[ { "requestId": "vocabulary", "action": "view", "uri": "/api/vocabularies?filter[vid-filter][condition][path]=vid&filter[vid-filter][condition][value]=tags", "headers": ["Accept": "application/vnd.application+json"] }, { "requestId": "user", "action": "view", "uri": "/api/users?filter[admin][condition][path]=name&filter[admin][condition][value]=admin", "headers": ["Accept": "application/vnd.application+json"] } ]

For each subrequest, we can observe that we are providing four keys:

  • requestId A string used to identify the subrequest. This is an arbitrary value generated by the consumer application.
  • action Identifies the action being performed. A "view" action will generate a GET request. A "create" action will generate a POST request, etc.
  • uri The URL where the subrequest will be sent .
  • headers An object containing the headers specific for this subrequest.

The response to this blueprint (after adjusting the permissions in Drupal to view users and vocabularies) will return the response to both subrequests:

{ "vocabulary": { "headers": { "content-id": ["<vocabulary>"], "status": [200] }, "body": "{\"data\":[{\"type\":\"vocabularies\",\"id\":\"47ce8895-0df6-44a4-af43-9ef3b2a924dd\",\"attributes\":{\"status\":true,\"dependencies\":{\"module\":[\"recipes_magazin\"]},\"_core\":\"HJlsFfKP4PFHK1ub6QCSNFmzAnGiBG7tnx53eLK1lnE\",\"name\":\"Tags\",\"vid\":\"tags\",\"description\":\"Use tags to group articles on similar topics into categories.\",\"hierarchy\":0,\"weight\":0},\"links\":{\"self\":\"http:\\/\\/localhost\\/api\\/vocabularies\\/47ce8895-0df6-44a4-af43-9ef3b2a924dd\"}}],\"links\":{\"self\":\"http:\\/\\/localhost\\/api\\/vocabularies?filter%5Bvid-filter%5D%5Bcondition%5D%5Bpath%5D=vid\\u0026filter%5Bvid-filter%5D%5Bcondition%5D%5Bvalue%5D=tags\"}}" }, "user": { "headers": { "content-id": ["<user>"], "status": [200] }, "body": "{\"data\":[{\"type\":\"users\",\"id\":\"a0b7af80-e319-4271-899f-f151d3fbfc8e\",\"attributes\":{\"internalId\":1,\"name\":\"admin\",\"mail\":\"admin@example.com\",\"timezone\":\"Europe\\/Madrid\",\"isActive\":true,\"createdAt\":\"2017-09-15T15:47:26+0200\",\"updatedAt\":\"2017-09-15T20:06:15+0200\",\"access\":1505565434,\"lastLogin\":\"2017-09-15T20:06:07+0200\"},\"relationships\":{\"roles\":{\"data\":[]}},\"links\":{\"self\":\"http:\\/\\/localhost\\/api\\/users\\/a0b7af80-e319-4271-899f-f151d3fbfc8e\"}}],\"links\":{\"self\":\"http:\\/\\/localhost\\/api\\/users?filter%5Badmin%5D%5Bcondition%5D%5Bpath%5D=name\\u0026filter%5Badmin%5D%5Bcondition%5D%5Bvalue%5D=admin\"}}" } }

In the (simplified) response above we can see that for each subrequest, we have one key in the response object. That key is the same as our requestId in the blueprint. Each one of the subresponses contains the information about the response headers and the response body. Note how the response body is an escaped JSON object.

This blueprint is not sufficient to create an article with two tags, but it's a great start. Let's build on top of that to create the tags and the article.

Dependent Requests

The next task we need to execute is the creation of the two tag entities:

  • Create the first tag in the form using the vocabulary UUID.
  • Create the second tag in the form using the vocabulary UUID.

To do this, we will need to expand the blueprint. However, we don't know the vocabulary UUID at the time we are writing the blueprint. What we do know is that the vocabulary UUID will be in the subresponse to the vocabulary subrequest. In particular, we can find the UUID in data[0].id.

We will use that information to create a blueprint that can create tags. Since we don't know the actual value of the vocabulary UUID, we will use a replacement token. At some point, during the blueprint processing by Drupal, the token will be resolved to the actual UUID value.

Replacement Tokens

We can use replacement tokens anywhere in the body or the URI of our subrequests. For those to be resolved, a token needs to be formatted in the following way:

{{<requestId>.<"body"|"headers">@<json-path-expression>}}

In particular, the replacement token for our vocabulary UUID will be:

{{vocabulary.body@$.data[0].id}}

What this replacement says is:

  1. Use the subresponse for the vocabulary subrequest.
  2. Take the body from that subresponse.
  3. Extract the string under data[0].id, by executing the JSON Path expression $.data[0].id. You can execute any JSON Path expression as long as it returns a string. JSON Path is a very powerful way to extract data from an arbitrary JSON object, in our case the body in subresponse to the vocabulary subrequest.

This is what our blueprint looks like after adding the subrequests to create the tag entities. Note the presence of the replacement tokens:

[ { "requestId": "vocabulary", "action": "view", "uri": "/api/vocabularies?filter[vid-filter][condition][path]=vid&filter[vid-filter][condition][value]=tags", "headers": {"Accept": "application/vnd.api+json"} }, { "requestId": "user", "action": "view", "uri": "/api/users?filter[admin][condition][path]=name&filter[admin][condition][value]=admin", "headers": {"Accept": "application/vnd.api+json"} }, { "action": "create", "requestId": "tags-1", "body": "{\"data\":{\"type\":\"tags\",\"attributes\":{\"name\":\"My First Tag\"},\"relationships\":{\"vocabulary\":{\"data\":{\"type\":\"vocabularies\",\"id\":\"{{vocabulary.body@$.data[0].id}}\"}}}}}", "uri": "/api/tags", "headers": {"Content-Type": "application/vnd.api+json"}, "waitFor": ["vocabulary"] }, { "action": "create", "requestId": "tags-2", "body": "{\"data\":{\"type\":\"tags\",\"attributes\":{\"name\":\"My Second Tag\",\"description\":null},\"relationships\":{\"vocabulary\":{\"data\":{\"type\":\"vocabularies\",\"id\":\"{{vocabulary.body@$.data[0].id}}\"}}}}}", "uri": "/api/tags", "headers": {"Content-Type": "application/vnd.api+json"}, "waitFor": ["vocabulary"] } ]

Note that to use a replacement token in a subrequest, we need to add a dependency on the subresponse that contains the information. That's why we added the waitFor key in our tag subrequests.

Finishing the Blueprint undefined

Using the same principles that we used for the tags we can add the subrequest for:

  • Create the article in the form using the user UUID and the newly created tags.

That will leave our completed blueprint as:

[ { "requestId": "vocabulary", "action": "view", "uri": "/api/vocabularies?filter[vid-filter][condition][path]=vid&filter[vid-filter][condition][value]=tags", "headers": {"Accept": "application/vnd.api+json"} }, { "requestId": "user", "action": "view", "uri": "/api/users?filter[admin][condition][path]=name&filter[admin][condition][value]=admin", "headers": {"Accept": "application/vnd.api+json"} }, { "action": "create", "requestId": "tags-1", "body": "{\"data\":{\"type\":\"tags\",\"attributes\":{\"name\":\"My First Tag\"},\"relationships\":{\"vocabulary\":{\"data\":{\"type\":\"vocabularies\",\"id\":\"{{vocabulary.body@$.data[0].id}}\"}}}}}", "uri": "/api/tags", "headers": {"Content-Type": "application/vnd.api+json"}, "waitFor": ["vocabulary"] }, { "action": "create", "requestId": "tags-2", "body": "{\"data\":{\"type\":\"tags\",\"attributes\":{\"name\":\"My Second Tag\",\"description\":null},\"relationships\":{\"vocabulary\":{\"data\":{\"type\":\"vocabularies\",\"id\":\"{{vocabulary.body@$.data[0].id}}\"}}}}}", "uri": "/api/tags", "headers": {"Content-Type": "application/vnd.api+json"}, "waitFor": ["vocabulary"] }, { "action": "create", "requestId": "article", "headers": {"Content-Type": "application/vnd.api+json"}, "body": "{\"data\":{\"type\":\"articles\",\"attributes\":{\"body\":\"Custom value\",\"default_langcode\":\"1\",\"langcode\":\"en\",\"promote\":\"1\",\"status\":\"1\",\"sticky\":\"0\",\"title\":\"Article Created via Subrequests!\"},\"relationships\":{\"tags\":{\"data\":[{\"id\":\"{{tags-1.body@$.data.id}}\",\"type\":\"tags\"},{\"id\":\"{{tags-2.body@$.data.id}}\",\"type\":\"tags\"}]},\"type\":{\"data\":{\"id\":\"article\",\"type\":\"contentTypes\"}},\"owner\":{\"data\":{\"id\":\"{{user.body@$.data[0].id}}\",\"type\":\"users\"}}}}}", "uri": "/api/articles", "waitFor": ["user", "tags-1", "tags-2"] } ] More Powerful Replacements

Imagine that instead of creating an article for a single user, we wanted to create an article for each one of the users on the site. We cannot write a simple blueprint, like the one above, since we don't know how many users there are in the Drupal site. Hence, we cannot write an article creation subrequest for each user.

To solve this problem we can tweak the user subrequest, so instead of returning a single user it returns all the users in the site:

[ … { "requestId": "user", "action": "view", "uri": "/api/users", "headers": {"Accept": "application/vnd.api+json"} }, … ]

Then in our replacement tokens, we can write a JSON Path expression that will return a list of user UUIDs, instead of a single string. Subrequests will accept JSON Path expressions that return either strings or an array of strings for the replacement tokens.

In our article creation subrequest we will need to change {{user.body@$.data[0].id}} by {{user.body@$.data[*].id}}. The Subrequests module will create a duplicate of the article subrequest for each replacement item. In our case this will have the effect of having a copy of the article creation subrequest per each available user in the user subresponse.

The Final Response

The modified blueprint that generates one article per user will have a response like:

undefined

We can see how a single subrequest can generate n subresponses, and we can use each one of those to generate n other subresponses, etc. This highlights how powerful this technique is. In addition, we have seen that we can combine different type of operations. In our example, we mixed GET and POST in a single blueprint (to get the vocabulary and create the new tags).

Conclusion

Sub requests is a great way to fetch or write many resources in a single HTTP request. This allows us to improve performance significantly while maintaining almost the same flexibility that custom code provides.

Further Your Understanding

If you want to know more about the blueprint format you can read the specification. The Subrequests module comes with a JSON schema that you can use to validate your blueprint. You can find the schema here.

The hero image was downloaded from Frankenphotos and use without modifications with a CC BY 3.0 license.

Categories: Drupal

Mediacurrent: Webinar Recap: Security by Design - An Introduction to Drupal Security

News from Planet Drupal - Thu, 10/12/2017 - 13:29

With cybercrime on the rise, securing data in Drupal has become a hot topic for developers and project stakeholders alike.

In our latest webinar, we were joined by three Drupal security experts from Townsend Security, Lockr and Mediacurrent who shared their approach for building a secure groundwork to protect site data in Drupal.

Categories: Drupal

Developer Instructor - Acro Media Inc. - Okanagan, BC

Drupal Jobs from Indeed - Thu, 10/12/2017 - 09:14
Drupal CMS knowledge is an asset, or PHP knowledge. Perfect for natural leaders who thrive on a heavy workload, this position carries the responsibilities:....
From Acro Media Inc. - Thu, 12 Oct 2017 09:14:16 GMT - View all Okanagan, BC jobs
Categories: Drupal

Bring current website to WordPress using Divi. - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 06:04
Take existing website and copy content to a nice responsive Wordpress template. No original content needed, just copy and paste and I will edit as needed. Transfer my logo and all images to new site. Looking for this to be done within 1 day. I have a website example that was made with Divi that I want my website to look like. Once completed, you will just upload to my Wordpress hosting. Will be looking for someone for ongoing projects. Please only apply if you understand the job description and can complete in a day or less.


Posted On: October 12, 2017 07:41 UTC
Category: Web, Mobile & Software Dev > Web & Mobile Design
Skills: CSS, Graphic Design, HTML, Web Design, Website Development, WordPress
Country: United States
click to apply
Categories: WordPress Maintenance

WORDPRESS WEBSITE NEEDED - Upwork

WordPress Work From UpWork - Thu, 10/12/2017 - 03:59
I have a prospective client who wants to Create a wordpress website to showcase his business.

I need a few drafts of possible layouts to win the contract.

I can supply enough content and images to get this underway.

Thanks


Posted On: October 12, 2017 07:41 UTC
Category: Web, Mobile & Software Dev > Web Development
Skills: Graphic Design, Website Development, WordPress
Country: Australia
click to apply
Categories: WordPress Maintenance