Specbee: Getting your Drupal Website China-ready: Why and How

Did you know that the Great Wall of China was the OG 'firewall'? Not for preventing password or network attacks, but for guarding kingdoms from unwanted visitors. Now fast forward to the digital era, and guess what? China now has its very own digital barrier too - the Great Firewall of China!  To all those folks who’ve never heard of the Great Firewall of China, it is a digital shield that came into effect way back in 1998 to regulate the internet within China. Foreign information sources and networking platforms like Facebook, Google, Wikipedia, X (RIP Twitter), and thousands of others that did not comply with their domestic regulations, were blocked, censored, or restricted in access. In essence, if your Drupal website is hosted outside of China (and complies with Chinese internet regulations), there's a likelihood that its loading speed will be significantly slower for users in China. However, China's vast digital landscape offers an exciting chance for growth and connection, given its position as one of the world's fastest-growing economies. Something that you wouldn’t want to miss out on! Discover the Great Firewall of China's story, how it works, and the compelling reasons to enhance your Drupal web presence in one of the world's fastest-growing nations! The Story Behind the Great Firewall of China Long ago, in the early 2000s, when computers were becoming a big deal, China thought, "Hey, we want to make sure our people only see things we like." So, they began building the Great Firewall, a digital wall around their internet. This wall acted like a filter, keeping out things the government didn't want people to see. As years passed, around 2006, the Chinese government made the wall even stronger with more rules and technology, controlling what people could do online. Websites like Facebook and YouTube weren't accessible in China by 2009 because they didn't match the wall's rules. The Great Firewall doesn't just affect people in China; it also affects websites from other places. If a website or app isn't in line with China's rules, it might be hard for people in China to visit it. So, while your Drupal website performs great in the rest of the world, in China, it might be entirely blocked, partially blocked (some resources and elements of your site), or just too slow to load. Here’s a side-by-side visual speed test comparison of a website loading from Ireland and China. It's worth noting that, even 36.9 seconds into the loading process, the China page lacks certain resources. Yay, or Nay? While the outside world looks at the Great Firewall (GFW) as a restriction of freedom of ideas, opinions, and damage to scientific progress and innovation, many supporters would disagree. Why? Due to the restrictions on mainstream platforms like Facebook, Twitter, YouTube, Google, Whatsapp, and Amazon, China developed its own sustainable digital ecosystem. Platforms like WeChat, Weibo, Douyin (the Chinese version of TikTok) Baidu, Alibaba, and Tencent became immensely popular. It can help protect the country's information and infrastructure from cyber threats, such as hacking and malware. It allows the government to control the online content and information that Chinese citizens are exposed to, aligning with their cultural and ideological values. By filtering out certain content, social stability can be maintained and the spread of misinformation or content that could incite unrest could be prevented. How does the GFW work While people sometimes use special tricks, like tunnels or climbing over the walls (VPNs), to go around this firewall and reach places like WhatsApp or Facebook, they usually are shortlived and get banned sooner or later.  So how do they do it? Here are three techniques used to restrict access: IP Blocking - This method involves blocking specific IP addresses associated with websites or online services that the government wants to restrict. When someone tries to visit a blocked site, their request is denied by the firewall, and the site doesn't load. DNS Poisoning - Here the gateway servers manipulate the DNS server’s IP address response and filter and deny websites. Manual Censorship - There are teams of engineers, technicians, and officials who are responsible for manually reporting unauthorized content and making sure the firewall operates effectively Prepping your existing site for the Chinese market While all these measures might pose challenges for website owners, it's undeniable that China offers a market brimming with opportunities that many would want to explore. Why should you still consider Chinafying your website? Massive market potential Gives you a competitive edge (not everyone considers it!) Improved accessibility and enhanced user experience Content localization and better engagement Opens doors to partnerships, collaborations, and business opportunities However, to ensure swift loading speeds within China, your Drupal websites could require intricate modifications and a significant allocation of resources. So, what are your options? Host your website on servers located in China Use a Content Delivery Network (CDN) service with servers in China Get an in-China presence by collaborating with local digital landscape experts To improve your SEO, optimize your website for local search engines like Baidu and localize your content to China Leveraging an intelligent website optimization service like Chinafy can help resolve technical issues on slow or broken websites (more below) How does Chinafy work? Merely opting for a CDN, switching hosting providers, or upgrading network speeds may not always suffice to enhance your local content delivery. To achieve effective onshore delivery, a combined approach involving additional services is often necessary. Enter, Chinafy. “Chinafy intelligently optimizes any website to achieve virtually onshore performance, and display more fully in China”  You can check out some of their case studies here. So once you submit your website to Chinafy, here’s what happens: Step 1: Analyze to optimize Your website is analyzed to understand its structure, content, and technical aspects. This helps in identifying what parts of your Drupal website need optimization for the Chinese market. Step 2: Technical enhancement Using its Smart Action Function (rule-based optimization), Chinafy optimizes your website's technical aspects to ensure it loads efficiently in China. This might involve replacing slow/blocked resources with China-friendly ones (or sometimes removing them if no replacements are found), reducing code complexity, and enhancing overall performance. Step 3: Speed boost Chinafy then bolts websites onto fully-managed, near-China Content Delivery Network (CDN) services to achieve further performance gain They configure the CDN to cache and deliver your website's content with reduced latency, hence improving loading speeds. For websites with an onshore presence and ICP, there are also the options to leverage onshore PoPs via Chinafy. Step 4: Automated sync Once the Chinafied version is ready, a synchronization mechanism is put in place. This automated mechanism essentially acts as a bridge between the two versions of your website— the one optimized for China and the original version hosted elsewhere. Now any changes made to your original site will be automatically tracked and synchronized with the Chinese version. You can find more detailed information on “How Chinafy Works”. Final thoughts Optimizing your website for the Chinese market can offer remarkable opportunities for expansion and engagement, given China's robust economic growth and vast online population. By implementing a comprehensive strategy that combines localization, technical prowess, and adherence to local norms, you can position your Drupal website to effectively connect with Chinese users and thrive in one of the world's most dynamic digital landscapes. Ready to prep your website for the Chinese audience? Let's discuss how we can tailor your Drupal website for success in China. Reach out to us today!

Golems GABB: Hiding Form Fields in Drupal 8

Hiding Form Fields in Drupal 8 Editor Mon, 08/14/2023 - 12:12

Imagine that you have created a content type with several fields. Depending on your needs, you may not require all of these fields to be displayed when viewing the entire node. Luckily, there is a simple way on Drupal how to hide a field on a form.
Code snippets may be applied to conditionally hide or enable a form field programmatically When you need to hide or show a form field. based on the specific value from another field, the Drupal form API hide field allows Drupal 8 hide form fields relating to values chosen in other fields. 

qtatech.com blog: Comparing the Top Drupal Hosting Platforms: Which One is Right for You?

Comparing the Top Drupal Hosting Platforms: Which One is Right for You? kanapatrick Mon, 08/14/2023 - 10:04

When it comes to launching a powerful and feature-rich website using Drupal, selecting the right hosting platform can make a significant difference in your site's performance, reliability, and security. With an array of options available, it's crucial to understand your hosting needs, evaluate performance, consider scalability, and weigh security features before making a decision.

Image removed.

The Drop Times: Empowering Cool Things with Ease in Drupal | Interview with Alexander Varwijk

Discover the driving force behind creating interactive online community experiences and embracing API-first approaches. Join us as we dive into the mind of Alexander Varwijk, the Lead Engineer at Open Social, and gain insights into his journey with Drupal, React, and GraphQL. Unveil the challenges faced by Drupal in staying competitive in the modern web landscape and learn how innovations in Rust and JavaScript are shaping the future of front-end, API, and application development. Don't miss this exclusive interview with a tech visionary at the forefront of web development!

DrupalEasy: A method for utilizing multiple authors for a single Drupal node

Image removed.A client recently asked me to figure out how to allow additional authors to not only be listed on a single node, but also to let them have the same edit and delete permissions as the main author of the node. I thought it might be helpful to put together an article that details one potential solution to this not completely uncommon task.

This is not something I have implemented in any modern version of Drupal (8, 9, or 10), so I took a fresh look at the problem by reaching out to my Drupal network via Slack and social media - I even asked ChatGPT (with poor results in this case.) I received several suggestions, including the very new Node Co-Authors module, the not-at-all-new Access by Reference module, and the full-of-momentum ECA module.

I also decided to use this as a topic of discussion during the weekly DrupalEasy office hours (exclusively available to our long-form training course students and graduates.) I did some initial research and decided to try the Access by Reference module first - mainly because it seemed rather flexible as well as straight-forward to use. I really liked the fact that I could configure it to use any user reference field I add to a particular content type to specify additional authors.

The Access by Reference module allows you to specify additional authors via several methods, including via a reference field (this is the obvious choice, IMHO,)  user email address, a shared profile value, or via a reference parent (interesting) For this use case, via a user reference field was exactly what I was looking for.

Spinning up a fresh Drupal 9 install to test it on, I installed the Access by Reference module and added a standard multi-valued "Additional authors" entity reference field on the Basic page content type (image above).

Next, I navigated to the "Set access by reference" configuration area and added a new "abr configuration." This is where I told the Access by Reference module about the user reference field I had just added. Setup was pretty straight forward:
 

Image removed.

There really wasn't anything tricky to setting up the abr configuration. I basically pointed to the "Additional authors" field I added, set the "Reference type," and then specified that I wanted additional authors to inherit read, update and delete permissions from the main author. Easypeasy.

The final step was to give the "Access By Reference" permission to the role of users I wanted to be able to become additional authors. For example, by giving this permission to "Authenticated users", then any user can be added as an additional author for a particular node and then have edit and delete permissions for the node (probably not the best configuration.)  In my client's case, they have something akin to an "authors" role that makes perfect sense for this scenario.

While this completed the functional aspect of the task, I really wanted the "Additional authors" field to be listed in the "Authoring information" accordion of a standard Drupal node add/edit form (when using Claro). This was accomplished with a very small custom Drupal module (named multiauthor) that implements a single Drupal hook:
 

/** * Implements hook_form_alter(). */ function multiauthor_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { if (in_array($form_id, ['node_page_edit_form', 'node_page_form'])) { $form['field_additional_authors']['#group'] = 'author'; } }

This hook alters the Basic page add and edit forms, setting my custom "Additional author" field (field_additional_authors) to the "author" group (this is the "Additional authors" accordion).

With that in place, the somewhat elegant solution is complete.
 

Image removed.

At this point, any users added to the "Additional authors" field will have the same read, update, and delete permissions at the owner of the node. Success!

Spinning Code: Mid-Career Resumes

As we exit the Great Resignation, and move back to more traditional hiring patterns, application materials are increasingly important again. Over the course of my career I’ve been involved in a lot of hires, and read a large number of resumes. I know what I like to see, what I don’t like, and I have a bunch of friends in a similar position (although their likes and dislikes are sometimes different).

Recently, I realized that much of the advice online about resume writing is for people early in their career. That’s fair; they are the people with the least experience and need the most help. But as someone who is now mid-career, and reading resumes for other people who are also mid-career, I am noticing resumes from people who seem to still follow the early career advice.

So a few weeks ago I reached out to my friends who, like me, sometimes review mid-career resumes. While none of us is a full-time recruiter, we are the people who you need to impress if you want a job on our team. This post is a combination of my take, and the input I got from those people.

There are NO Hard Rules About Resumes

Resumes are not a regulated industry. There are no hard and fast rules. Any advice you see is just a set of suggestions. In the end, you have to decide what makes you look good and guess at what is effective.

Studies are rare, and even the best are poorly done. That is not the researchers’ fault. You cannot double blind a job hire. You cannot have 1,000 managers at different companies all hire for the same job from the same pool of applicants. Any one who knows a researcher is watching them work, likely changes their behaviors. Any study that finds bias creates legal risk for companies that participate which in turn limits participation and openness to data publication. List of problems with studying the process goes on and on.

  • Anyone who tells you there is one best way to create your resume, is wrong. 
  • Anyone who is entirely focused on the hiring manager, risks failing to give advice to beat automated filters.
  • Anyone who is entirely focused on beating the automated filter, ignores that nearly ½ of the jobs in America are at small companies and unlikely to use such filters. 

Write the best resume you can. Ask friends, particularly those who do hiring, for feedback. Consider paying a resume writer for help. But don’t expect even paid experts to be correct all the time.

Mid-Career Resumes Should Highlight Your Experience

The biggest mistake I see in resumes of people in mid-career, or even late career, is failing to highlight their experience. People who were at one employer for a long time struggle with this the most, but I’ve seen resumes for people with 15 years of experience that read like a recent graduate.

Your experience should be front and center. Everything about your resume should say “this is an experienced person.”

I like some form of summary at the top. Tell me what kind of employee and colleague you are. Not an objective section, but a summary of who you are. It can come in many forms: 

a short paragraph:

Salesforce MVP, developer, administrator, and consultant with 20 years of experience in the nonprofit and higher education sectors. Seven Salesforce certifications, experience in more then 20 programming languages. Proven experience leading teams and working closely with non-technical clients.

list of titles, or key phrases

Salesforce MVP, Technical Architect, Nonprofit Fundraising Expert

After that, your job experience and skills are next. How exactly you do this can vary. Some people like skills in a sidebar. Some people put a list at the top. Some people put that list after their job experience. Frankly, as a reader, I don’t care. But I want to be able to find your list of skills and your relevant job history fast.

Your currently valid certifications should be included near your skills. But only those the reviewer will find relevant. 

Think About Your Audience

Likely the person reading the resume of an experienced person is an experienced person. We have habits, routines, and work styles that are built on experience. We also have things like aging eyes, old printers, out of date external monitors, and other things that it are tempting to ignore.

Text should be high contrast, print well in black and white (there is a huge exception here for graphic designers, who benefit from showing off graphic design skills), and be generally easy to read. I don’t want your pretty three color graph, head shot, or blue text that prints light gray.

If I am reading a handful or resumes, I’ll do that on a screen and I can zoom in if I need. But if I’m digging through a big pile, I’ll print them. I will print them on my 20+ year old laser jet, blank and white, printer. When I last worked in an office and reviewed resumes, I used the office’s even older laser jet black and white printer. Your shaded background might make the whole thing unreadable on those devices. Besides, you should have too much experience to waste space on a picture (and that’s before we talk about companies trying to avoid identity based biasing who might not want reviewers to know what you look like too early in the process).

I strongly recommend going for simple, clean, classic, design approaches. 

Mid-Career Resumes Should be More Than One Page.

I haven’t used a one page resume in more than 20 years. I don’t know who is still saying one page is the magic number. A new graduate might benefit from the one-pager, but if you have 10-30 years work experience, and you only need one page to tell me, it better be the most amazing page of text you’ve ever created. When I see a one-page resume, before I see the words I see a person with limited experience.

Personally, I like the two pager. Two very full pages. I want to see that you were forced to edit and format aggressively to make it fit on two pages. You want me to think you have 5 pages of content, but you compressed it effectively.

Two pages gives you plenty of room to show off, without wasting my time. It shows me you can edit and filter content. Ideally, it’ll leave me wanting more information, that gives me questions I can ask in your interview.

Some people like longer. When I spoke with friends who hire, most people liked two pages. But some were open to 3-4. Beyond four you are into academic CV land, which is a different thing entirely.

Connect the Dots

You have experience, you are showing it off well, good. But are you showing off the right experience? One of the most consistent pieces of feedback I got from friends who do hiring is that we want to know you know who we are as an employer.

No every detail, but tell us what your public persona is. Is there a values statement in the job ad? Reflect some of that language back in a cover letter. Do we work in a specific market? Make sure to include some experience that connects you to that market. 

When I worked at a nonprofit, we wanted people excited by the work we did. Which means they needed to find ways to tell us in their resume, cover letter, application, and interview they knew something about that work. Since becoming a consultant, I’ve been consistently amazed that people will send resumes and come to interviews that don’t know what kind of customers we have.

Write a Cover Letter whenever Invited

This applies not just to mid-career applicants, but everyone else too. Not all jobs accept a cover letter, but when given the chance to say more: say more.  The numbers I can find on resume review suggest an average of 6-7 seconds. I think that’s low in practice (see comments on studies), I know when I dig through a large stack I find ways to filter out some very fast, and others get more careful review. So an average will likely be far from my median or modal times.  Even so, a resume that isn’t tossed out because it’s an applicant who is wildly unqualified, will get 15-30 seconds in my first pass.  You add a cover letter, now I’m spending more time reading. You could double, or even triple, the time you get in the first review 45-90 seconds – that’s huge.

It also means you can connect some additional dots for me. If your resume includes experience that you consider related, but that might not be obvious, you have a couple sentences now to tell me that story. Are you career pivoting? Tell me what about your old career makes you better than your experience suggests. Do you volunteer in your community? Tell me what about that helps you understand our work, or support our company values.

In Mid-Career Resumes the Basics Still Matter

Details matter: fix your typos, use consistent formatting, etc. I saw a resume recently with a red-line through their summary line. That’s a bad first impression.

Write resumes you want to read: If you have read resumes as part of your job, think about the ones that impressed you and mimic those.

Get feedback from a friend: You probably have friends and professional contacts who will give you blunt feedback. Ask for it. I did as part of writing this post.

Consider hiring an expert: There are people who do this for a living. Some of them are really good. When you ask your friends for feedback, ask them for references to services they used.

Not everything is needed: Edit down your experience. Keep the stuff that says you’re awesome, cut stuff that’s not relevant to the hiring manager.

References for More Thoughts on Mid-Career Resumes:

The internet is full of advice on resume writing. Most for beginners, but some for people with more experience.  Here are a few things I found useful:

The post Mid-Career Resumes appeared first on Spinning Code.

LN Webworks: Step-by-Step Guide: Adding Google Directions Module to Drupal

Image removed.

Drupal, with its robust API-first approach, opens up a world of possibilities for seamless communication with various Google services. Amongst all, the Google Directions API stands out as a powerful tool for providing accurate navigation and route planning services. Leveraging Drupal's capabilities, integrating the Google Directions API becomes even more accessible and efficient. 

Before we delve into the Google Directions Module for Drupal development and learn how to implement it, let’s understand Google Direction Module and the crucial prerequisites that would get you prepared. 

CTI Digital: Drupal developer, Viktor, now certified with Acquia's Drupal 10 site builder certification

Image removed.

We have fantastic news to share! Drupal developer, Viktor Tamas, has recently passed the Acquia Certified Site Builder exam for Drupal 10. This achievement is a testament to our team's commitment to learning, strengthening our capabilities while providing great promise for our clients.

Image removed.