Fix syntax error def __init__(self, road_func=None, properties=None, road_func=None): ^ SyntaxError: duplicate argument 'road_func' in function d…+1 -1
The Mediacurrent team is excited to formally introduce Rain, an enterprise-grade Drupal install profile. Two years in the making, our team has spent countless hours developing these tools internally and deploying them to our client projects.
Our goal with this post is to share with the broader Drupal community, explain why we created Rain, and share how it can benefit your organization. We welcome feedback.What is Rain?
The Rain installation packages the best solutions the Drupal community has to offer so that organizations can build sites faster. We have used Rain internally for the last two years, making improvements along the way prior to its release as an open-source project.Made by Mediacurrent
We designed the Rain install profile with the goal to capture features that overlap all verticals and projects of every size and scope. As part of the development process, we examined features and content patterns from successful client projects over the past three years. Through our research, we found many content features and module configurations did, in fact, apply to projects across the spectrum. Our focus has been to build Rain with the features that create the best admin and authoring experience we can provide for our clients and the open-source community.
Mediacurrent believes strongly in open source solutions, so we have released all of our project tooling to the community. For more information on the tools we have publicly released please visit the Mediacurrent Development Tools page for more information and links to our projects.Who is Rain for?
It’s a full-time job to simplify processes on the backend and deliver a consistent, high-impact customer experience. Mediacurrent created the Rain Install Profile to make these jobs easier.
Clients using Rain today include large B2B Enterprise, Higher Education, and Non-profit organizations. The Rain distribution is flexible enough to serve large and small organizations alike. For large enterprise builds, the install profile will reduce overhead and take advantage of reusable features even if the project overall is a highly-customized implementation. Smaller, more budget-conscious organizations have the opportunity to reuse even more out-of-box functionality for further savings. The end result is a fully branded, enterprise-grade Drupal solution for your organizationWhat makes the Rain Install profile different?
At DrupalCon this year, co-worker Justin Rent and I presented on the idea of “Content Patterns.” This presentation gives a window into the challenges we were facing and our approach to addressing those challenges. In short, we believe to have long-term success as an agency we need to pool together best practices and take advantage of repeatable patterns. While every project we work on is unique in some way, we also see many shared problems that could benefit from common-sense solutions. As an organization, we made a commitment to build tools that would address those problems and share them with the community.
We package popular contributed modules like Metatag and many others that focus primarily on authoring and admin experience. Our installation comes with “sensible defaults” that offer a great out of box experience while saving developer and administrative time.2. Offer flexible content features to jump-start development
Rain offers a variety of content features, including content types and paragraphs, not found in most distributions. These features are all optional and offer the opportunity to jump-start development.
We believe our approach to content architecture gives editors a consistent, flexible interface for managing content. At the same time, it helps developers get going faster while being fully configurable.3. Ship with an extendable base theme and style guide
Rain ships with an excellent starter base theme. This offers several advantages but is not required (see our GatsbyJS + Rain webinar for a “decoupled" option).
The theme ships with a base style guide that includes the most common components you’ll find on a website. These components provide basic styling and markup that saves development time. The components are intended to be branded to match the design requirements of a given project. Additionally, all Paragraph features are pre-integrated with the base theme and style guide to once again save development time and reduce costs. The net result -- the development team gets a running start on a new project instead of constantly reinventing the wheel.Next steps
We would love to hear feedback from you. What features are your pain points, what features would you like to see? Interested in working with Mediacurrent? Contact us for a live Rain demo or for more information about our services.
We’re excited to be hosting the August 2019 TC Drupal monthly meeting, the first in the new "Lunch and Learn" format, which will rotate venues and feature a myriad speakers. See Allie's post about the change on the Twin Cities Drupal.org page. We look forward to them each month!
The expanding data landscape is feeding the demand for higher operational agility. This calls for a more responsive, reliable IT infrastructure — that doesn’t rake up millions — minimizes delays and downtime while improving security and making infrastructure more agile.
Between capacity constraints and unpredictable pricing models, AWS offers suited workloads for growing infrastructure needs with a host of services - IaaS, PaaS, SaaS - for Drupal enterprises.
Here’s how you can run your Drupal up to 40% cheaper.
Drupal-powered enterprises need to constantly understand and adapt to the changing landscape in order to achieve the business objective
You know how important accessibility is, but now what? There are a lot of well intentioned sites on the internet that aren’t accessible.
Is your website accessible?
How do you find out?
Well, it’s not as hard as it seems—and we’re here to help! Here are a few quick ways to measure the accessibility of your website.1. Automated accessibility tests
While automated tools will only catch about 30% of accessibility bugs, they will give you a general idea of your site’s accessibility and show you some ways to make improvements.Lighthouse: Chrome’s Accessibility Reporting Tool
Lighthouse is a free tool available right in Chrome. You can use it by simply using chrome’s testing website, in your development tools when you inspect a page, or with a browser plugin. Keep in mind that manual testing is also required to get a full picture of accessibility—we’ll cover that in just a moment.
To use the tool by going to a URL: Visit https://web.dev/measure and paste the URL of the page you want tested into the form field, then click “Run Audit” to see results.
To use the tool through inspect
- Right click on the webpage you want to test, and select “Inspect” from the dropdown or from your keyboard press command + option + I. This will open the inspect tool and bring up the last tool you used, so if the last thing you did was run an audit, it will bring you back to the audits panel.
- In the inspection window at the top right, click on the button with a double arrow, or expand the window until you see “Audits.” Select “Audits.”
- Select your device size (mobile or desktop), and select “Accessibility” from the Audit Type options.
- Click “Run Audits.”
- A report will pop up in the inspect window with your overall score with information about your score results. Scores are out of 100, and 100 does not mean that a site is completely accessible–it means that it passed all automated tests.
- Below the score are details about accessibility errors. Toggle open these errors to see what element is failing and how to make fixes.
WAVE is a browser extension that allows you to run an automated accessibility test on a page of your website. It’s very thorough and one of our favorites for testing and fixing accessibility bugs.
To use WAVE:
- Install the WAVE Extension
- Go to the webpage you want to test, and click on the WAVE icon in the tools portion of your browser window. A report will pop up and your page will be marked up with the results of the review.
- A Summary will show up by default listing the number of Errors, Warnings, and other details on the page.
- Click on the Flag icon to see more details. This will include information about what errors are on the page
- Clicking on the Tab at the bottom of the page that says “< code >” will show you the code marked up with the errors found.
- With the “< code >” tab open, you can click on the errors and warnings in the panel on the left to jump to the errors in the code. In the image below, clicking on the yellow rectangle “Redundant Link” icon in the report panel makes the code jump to the offending code.
A manual test will catch things automated tests can’t quite figure out. Robots are good for some things, but they can’t figure out human intention, so things like tab order, visual theming and good alt tags should be manually tested.
Keyboard testing makes sure that the site works for folks who are blind, who have low vision, who have limited mobility, or the person whose trackpad is broken. Conduct the following tests to see if your site is accessible to those using a keyboard to navigate:
- Go to the page you’d like to test. Start with your cursor in the address bar, and hit the “tab” button to navigate through the page. Each time you press tab, you should be moved to the next button, link or form input.
- Ideally, the first link you get to on the page is a “skip to main content” link that allows users to skip repeated navigation items.
- As you continue to tab through the page, you should be able to see where the focus is as it lands on each button, link and form field. Pro-tip: If you lose track of where it is because there’s not a visual indication that’s an accessibility issue.
- Check the order: Does pressing the tab key follow the natural flow of the page, or does it jump around? A good tab order follows the natural flow.
- Can you operate all menus, pop-ups, buttons, and forms?
- Can you press shift tab and navigate backwards?
- Are there items that are clickable that don’t receive focus?
Important Note: Keyboard testing needs to be done on mobile as well as desktop. Why? Some users who are blind don’t use full-sized computers or laptops because they don’t actually need a large display. Other users have low vision and magnify their screens. Which leads us to testing with zoom…3. Testing with zoom
If you zoom a desktop screen to 400% on a responsive site you get…the mobile site! This is why testing on mobile and desktop is important.
Now that you’ve increased the screen to 400%, browse the page. As you browse ask yourself:
- Does text content get cut off?
- Do buttons get pushed off of the page?
- Is the functionality intact?
- Is there key functionality on desktop that’s no longer available on the mobile version?
Using a screen reader is a more advanced testing approach, and very helpful in identifying accessibility bugs on a site. If you use a mac, VoiceOver is the built in screen reader. To turn VoiceOver on or off, press command f5. Here’s a quick video tutorial on how to test your page using VoiceOver. The video description includes the full text of the captions as a quick reference.
You can also turn on VoiceOver and tab through the page again to see if icon buttons are labeled properly, if the form labels you’ve applied make sense, and if alt tags on images are useful. If you press “control option a” all at once, VoiceOver will start reading every element from where you are on the page. If you tab, it will read the buttons, links and form inputs.To sum it up:
Learning about different testing methods can help inform and add clarity to the process of making your site accessible. This is one of the most critical steps in your journey to making a website that everyone can experience. If you want to know how to transform these errors into a site that reads and navigates smoothly for all users, ThinkShout is here to help! Contact us to learn more about how we can partner to make your website more accessible.
Recently I ran into a situation while building out the Watson/Silverpop Webform Parser where I just wanted to test and see if a few things worked without having to reload and bootstrap Drupal every time I refreshed a page. I also wanted to utilize some of the classes and methods made available from Symfony and Drupal. Can you feel my dilemma?
Let's be honest, running drush cr and refreshing a page takes time, and I'm an impatient person, so I wanted to see if there was a way to use some of these things without going through the pain of waiting for a Drupal bootstrap. Turns out, the solution wasn't that difficult and it made development on many methods of my module more pleasant than it could have been.Here's the scenario
I wanted to test a few things that didn't require the database connection. Specifically, Drupal\Core\Serialization\Yaml to parse an array that I was building into YAML. So, what I did was stubbed out what would become my class WatsonFormEntityForm in a file in my docroot that I creatively named test.php. Now I was able to navigate to local.docksal/test.php on my local machine and see things working.Get to the good stuff, already!
I got to a point in my development where I was able to convert the submitted HTML, in this case from a call to file_get_contents('./test.html'); into an array that I could work with. Xdebug was going great, and so was the module, but I wanted to see if I could convert it into YAML using a native Drupal method. The solution came with one single line of code.$autoloader = require_once 'autoload.php';
This tells PHP, "Hey, we got a file here that wants to use some of the methods and classes in the Autoloader. Let's go ahead and let it!" This variable doesn't need to be called anywhere in the file. It just needs to exist. Now I was able to update the file with a few friendly use statements from within the Drupal and Symfony ecosystem without having to wait for all the database connections to happen.
The end result was:<?php use Drupal\Core\Serialization\Yaml; $autoloader = require_once 'autoload.php'; // Do all the things here, including: $yaml = Yaml::encode($array); var_dump($yaml);
It sped up development, and it made it so I didn't have to wonder if something wasn't working because I forgot to drush cr all the things or if it was just because I made some mistakes.Gotchas
Be sure that any code you're running doesn't rely on database calls or the container. For instance, if you try to run $nodes = \Drupal::entityTypeManager()->getStorage('node')->loadMultiple(); is going to throw a painful error.
Also, this is mainly for rapid prototyping or proving concepts. I don't recommend writing an entire module in procedural code and then trying to refactor later. Maybe take it one function at a time just to make sure it's doing what you want it to do.
Let me know if this helped you out or if you have better suggestions for rapidly testing some Drupal stuff without having to rely on a full bootstrap. As always, feel free to reach out to me on the Drupal Slack, where I'm always Dorf and always willing to help if I can.Category Development Tags Drupal Drupal Planet Comments
If you've opted for Drupal, then you must be dealing with a large amount of content, right? Now, the question that arises is: how do you build out and structure a complex content architecture in Drupal 8?
For you definitely don't run out of options when it comes to organizing your content:
- content types
- paragraph types
- (custom) block types
- custom fields
And things get even more complex when you start to consider all the various relationships between these entities.
file_scan_directory is deprecated and has been moved to the file_system servicekarthikkumardk Thursday, 25 July 2019 - 15:29:44 IST
Mediacurrent created the Rain Install Profile to build fast, consistent Drupal websites and improve the editorial experience. Rain expedites website creation, configuration, and deployment.
In the last developer tutorial, we covered how to customize and develop Drupal sites using Rain’s base install profile. This week, we will dive into theming to help frontend developers update the look and feel of the Rain starter theme.
As usual, if you have a question or comment feel free to reach out at @drupalninjaSub-theme or clone?
The first thing to note is that you can use the Rain install profile with or without the included Rain theme package. The “rain_theme” project exists as its own Composer project which is included by default but can be easily removed. That said, there are benefits to using the Rain Theme as a base theme or starter. The primary benefit is that Paragraphs are integrated with a dozen or so pre-built components that can be easily customized and save you time.
If you do choose to leverage the base theme, you need to decide whether or not to use Rain Theme as a “parent theme” or as a starter. We highly recommend you do not. This way, you gain full control over the theme and do not need to worry about downstream updates. Leveraging Rain theme as a parent theme can cut down initially on files and code but parent themes in Drupal can be restrictive and cumbersome at times. Ultimately, the decision is yours. With the “clone” approach you can grab everything and rename it or grab only what you want. Anything you don’t use can be discarded.Using the style guide
The Rain Theme project includes a KSS-based living style guide that has a host of pre-built Twig components that can be integrated with Drupal theme templates.
KSS style guide Example
In the previous step, we mentioned that we recommend cloning the theme so that you can fully control and customize any of these components. The idea is that developers waste less time rebuilding and re-styling the same common components on every new build. Instead, Drupal themers get a head-start while still having enough control of the theme to meet the design requirements of the project.
Working with the popular KSS node project is straightforward. For more information on how to compile and develop with KSS node, visit the project page at https://github.com/kss-node/kss-node.
Even if you are new to KSS, you will find making updates is easy. The “npm run build” command will compile all of your theme assets, as well as the style guide.Component Integration
The main way components are integrated into Drupal templates is through includes found in Paragraph templates.
Rain Theme Paragraphs Twig templates screenshot
Rain Theme Quote Paragraph templateLibraries
Rain Theme Libraries screenshotAdditional Theming Helpers
In addition to the pre-configured templates, style guide and libraries included with Rain, we also ship a few helper modules to make theming easier.
The “Twig Field Value” module makes it simpler to pull out values from fields and the “Twig Tweak” module adds several utility methods. For a full list of those functions with information visit the “Cheatsheet” documentation page on Drupal.org. As mentioned earlier, the “Components” module is also included and enabled by default in order to allow namespaces to be defined in our theme.Wrap-up
In this article, we showed frontend developers how to leverage the Rain base theme and style guide. Our recommendation is to clone the theme folder and customize our pre-built components to match your project’s unique requirements. We also covered how to integrate Drupal theme templates with components and define custom libraries. Finally, we covered a few helpful theming modules that ship with Rain and save development time.
In the next (and final) Rain tutorial, we will wrap up this series with a focus on content creation for authors.
Was this information helpful? Let us know! https://twitter.com/drupalninja/
This blog has been re-posted and edited with permission from Dries Buytaert's blog:
Volunteering as a mentor at CoderDojo to teach young people, including my own kids, how to write software.
Last week, I published an opinion piece on CNN featuring my thoughts on what is wrong with the web and how we might fix it.
In short, I really miss some things about the original web, and don't want my kids to grow up being exploited by mega-corporations.
I am hopeful that increased regulation and decentralized web applications may fix some of the web's current problems. While some problems are really difficult to fix, at the very least, my kids will have more options to choose from when it comes to their data privacy and overall experience on the web.
You can read the first few paragraphs below, and view the whole article on CNN.
I still remember the feeling in the year 2000 when a group of five friends and I shared a modem connection at the University of Antwerp. I used it to create an online message board so we could chat back and forth about mostly mundane things. The modem was slow by today's standards, but the newness of it all was an adrenaline rush. Little did I know that message board would change my life.
In time, I turned this internal message board into a public news and discussion site, where I shared my own experiences using experimental web technologies. Soon, I started hearing from people all over the world that wanted to provide suggestions on how to improve my website, but that also wanted to use my site's technology to build their own websites and experiment with emerging web technologies.
Before long, I was connected to a network of strangers who would help me build Drupal.
Here at Phase2, we’re excited to participate in the premiere Drupal government event, Drupal GovCon, held at the National Institutes of Health campus in Bethesda, Maryland where we'll once again be a platinum sponsor.
We hope you will join us for one of North America’s largest Drupal camps, this week.
Drupal is a favorite content management system among professionals. It has been proven time and time again that it is reliable, scalable and can turn any website into a magical digital experience that your customers are loving. For these reasons, Drupal has gathered a passionate community that wants to constantly see it improve. Here at Sooperthemes, we are also driven by our passion for Drupal. We take Drupal and improve its shortcomings through our products. In other words, we enhance your Drupal experience with our framework theme and easy-to-use Drupal 8 & 7 visual content builder.What are some examples of real-life organizations using Sooperthemes products?
It’s time to show you the results of using our easy-to-use drag and drop builder, and our framework theme. Here is a list of websites that were entirely built over the Drupal architecture using Glazed Builder and Glazed Theme:1. Senate.gov Senator websites
The U.S. Senate is a core part of the legislation process of the United States. Such an important part of the U.S. had a need for a really good website platoform. Drupal was chosen because it can handle large and complex websites. On top of that, the senate chose to build all websites for newly inaugurated senators in 2019 with our Glazed Builder and Glazed Theme products. This resulted in a modern-looking governmental senator websites that provide a great experience at low costs to the senate, because much of the page-building work can be done in-house thanks to our easy-to-use page builder.2. Swarco
Swarco is a company that offers traffic technology for better and safer transportation. It is based in Innsbruck Austria and has an international network of production facilities that are sure to meet the needs of their clients. Swarco decided to improve its online presence by overhauling its website with Glazed Builder. This resulted in an unforgettable digital experience that leaves a long-lasting impression. Well done!3. Body Worlds
Body Worlds is the biggest traveling exposition of dissected human bodies. The exposition attracted more than 37 million visitors, which makes it one of the hottest tourist attractions to date. Such a successful exposition had to also have an online presence that reflected their success. That's why Body World built its website with Glazed Builder. This resulted in a gorgeous website that attracts clients from all over the world.4. Monterrey Institute of Technology and Higher Education
Monterrey Institue of Technology and Higher Education is one of the most prestigious universities in Latin America. With its headquarters established in Monterrey, Mexico, Tec offers the finest education to its student. Such a successful university required a beautiful website that can convince prospective students to join their ranks. That's why Tec decided to go for the combination of Drupal and Glazed Builder. This resulted in a beautiful website that can tackle the multi-lingual necessities of the university, while also attracting a large number of students.5. Open Medical
Open Medical is a company that wants to improve the delivery of healthcare services to the general public. In order to do this, they partner with various companies that help them reach their goal. On top of that, such an initiative needed a good website that can showcase their mission and values. That's were Glazed Builder came into play. The results were a practical website that showcases the trustworthiness of Open Medical to their potential customers. This resulted in an increased number of clients and leads generated.What Sooperthemes' products?
Sooperthemes bases its products on the Drupal architecture. This means that you get the best that Drupal has to offer without any of its drawbacks, making it possible to enhance your Drupal experience. The Sooperthemes portfolio includes a large number of turn-key demo websites that can be used to quickly set up a gorgeous website that converts leads to customers right out of the box. There is a wide selection of demos that you can choose from based on the industry that your company is conducting business.
This theme is perfect for any marketing agency that wants to have a gorgeous website that looks professional and attracts high caliber clients. The theme is highly customizable, being able to be adapted to the needs of every marketing agency.Business Drupal Theme Demo:
Sooperthemes also provides a business website theme, perfect for people that want to have a new and astonishing website for their clients. The business theme focuses on a more professional look that conveys trust to your prospects. The business theme is the perfect choice for any business owner that wants to provide a great online experience for their customer.Agency Drupal Theme Demo:
Our agency theme is the perfect choice for any agency that wants to create or improve their digital presence. It is designed to be able to fit the needs of any agency that wants to impress their audience. It has an intuitive design that can surely make a great website for your agency. Especially if you want to enhance your Drupal experience.Logistics Drupal Theme Demo:
Sooperthemes has the perfect theme website for any logistics company that wants to have an impressive online presence. The layout and design are specially adapted to be able to convey the fluidity and speed with which logistics companies are driving business. Moreover, these themes can further be customized to be able to reflect your brand.Photography Drupal Theme Demo:
Are you passionate about photography and don't how you to monetize your hobby? The Glazed Photography theme is the right answer for you. You can easily setup-up your website to be able to show your clients your finest material. Glazed Photography is the right answer for you if want to have an edge above your competition.Construction Drupal Theme Demo:
Any construction company has to have a jaw-dropping online presence in order to be successful. This is what you get by having by building your website with Glazed construction theme. This theme is perfectly adapted to reflect the seriousness and commitment of the construction industry. Whether you want to showcase your team or your portfolio, this theme is the perfect choice to make a lasting impression to any potential client.Powerful content capabilities with Sooperthemes' easy-to-use visual content builder
These themed demo sites are further customizable to suit your needs with our Glazed Builder module. This module makes it easy to turn your dream website into reality. Glazed Builder is a powerful Drupal-based drag and drop visual builder that can make any Drupal website shine. One of the struggles that Drupal users seem to have at first is the steep learning curve, which can require a large number of hours, essentially bottlenecking the workflow. In order to bypass this struggle, Sooperthemes designed Glazed Builder, effectively helping website designers and marketers save countless hours and money on working with Drupal. The hours saved can be used for other important tasks. One of the great points about Glazed Builder is that it makes designing a Drupal website seem effortless.Why enhance your Drupal experience with Sooperthemes?
This is a great question that everybody should be asking themselves this before making a purchase decision. Well, let me explain.
Sooperthemes is driven by its passion for Drupal. Our main goal is to enhance your Drupal experience. In order to do so, we address the most common pain point that Drupal has, such as long development time, steep learning curve and difficult user interface. Sooperthemes has developed its products to be able to accommodate these needs. With the Glazed theme, users can quickly have a template for their Drupal website that can be easily customizable and deployed. On top of that, Glazed Builder overcomes the native powerful but complex user interface of Drupal with its Drag and Drop capabilities and intuitive user interface. On top of that, Glazed Builder incorporates a large number of elements that can be used to be able to further customize your website. Examples are sections, panels, jumbotrons, wells, panels, collapsible, Drupal blocks, Drupal views and much more.
As you can see, the imagination is the only limiting factor when it comes to the capabilities of web design with Glazed Builder and its capabilities to enhance your Drupal experience.Conclusion
If you want to enhance your Drupal experience, then Sooperthemes is the right answer for you. Not only does it offer the best of what Drupal has to offer, but it also transforms Drupal's weak points into its strong points. If you’re not convinced yet, no problem, try Sooperthemes for free here!
Solhem Companies develops, owns and manages award-winning residential and office properties in Minneapolis, Minnesota’s most desirable neighborhoods. TEN7 has been working with Solhem since the beginning.