Drupal StackExchange

Force users to always log in and show no content

9 hours 37 minutes ago

I am using Drupal 7.31 and I installed the MD Alpine theme. I have a site which loads a video on the front page. I want to hide this front page. When users come to my site, I want them to be redirected to the login form.

I tried changing the home page to /user and that was a huge mistake. I did manage to undo this. I also went into the permissions and removed any permission for the anonymous user, including the permission to view published content.

I know I have seen this question before, and it seems like there might be a module that can fix that. I am willing to make some configuration change.

tjholmes66

File Transfer failed, reason: Unable to change to directory

10 hours 39 minutes ago

I'm work on updates modules in my drupal site. When i access localhost/authorize.php after linked in config, i recieve this:

Update failed! See the log below for more information. Your site is still in maintenance mode.

the log is...

views Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/views views_bulk_operations Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/views_bulk_operations webform Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/webform jquery_update Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/jquery_update simplenews Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/simplenews entityreference Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/entityreference ctools Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/sites/all/modules/ctools entity Error installing / updating File Transfer failed, reason: Unable to change to directory /drupal/sites/all/modules/entity

I have tried to fix permissions in folder using: sudo chmod a+w and sudo chown root sites/default and chmod 777 , every using folder sites/default and sites/all/modules, but i canot successfuly updates my modules using ftp and automatic.... how i fix this? thanks in advance

Matheus Silva Itep

Display content based on URL

11 hours 40 minutes ago

I am working on Drupal 8. I have a to display content from a content type on different pages. I am trying to use Views to achieve this.

In the content type I added a field to refer to Pages so that I can create relation between content of content type and Pages (another content type). Basically its like tagging content with page name.

I want to display content from content type created on those pages tagged in the content. I am not able to achieve using views.

Any ideas how this can be done? I have tried contextual filter and relationship but none works.

Thanks

Deva

Upload External File to Drupal File System

12 hours 38 minutes ago
Situation

I would like to be able to upload files programmatically from an external source to the drupal file system. I was thinking of making a RESTful API that allows me to save external files into my site's public file path. The file is an excel file as well if that changes anything.

Problem

Currently, I am thinking of just using an S3 bucket to store the external files. Then within my site, I would simply run a GET REQUEST and programmatically save the file. I was just hoping there was a way to simply POST a file in drupal without me having to use Amazon's S3.

Parameters:

  • Drupal Version 8.8
  • Drupal Site BackEnd= PHP 7.3
  • External App FrontEnd = Vue.js
  • External App BackEnd = .NET Core
  • Required File Type: .xlxs
  • Secondary File Types: .csv, .docx, .json, .jpeg, .mp4, .txt
TL;DR

How can I make it so another site/app can upload files to my site? (using JavaScript)

Notice: I understand StackOverflow is only meant for help with code issues but I would greatly appreciate some help getting started and if not at least some very useful links that are credible. Some of the research I have found is not useful seeing that I am on Drupal 8.8

B. Cratty

How to pipe output of "drush sql-dump" without warnings

13 hours 41 minutes ago

When I do: drush sql-dump > somewhere/database.sql if there will be any warnings printed by Drush, they will be included at the beginning of the created database.sql file. Can we avoid it somehow?

I know there is the --result-file= option that ignores all warnings when creating the file, but is there any way to ignore warnings when piping the output? I would like to parse the output before actually saving it into a file if its possible.

drush 8

Łukasz Zaroda

Upload Nodes with Image Fields

14 hours 38 minutes ago

I'm using jquery mobile and phonegap for a mobile app. I have uploaded an image file and received the fid but the subsequent request to create a node and attach the fid fails. The node is created although the image field is not filled in with the fid. Also the uploaded image in ../sites/default/files doesnot have dimensions(height and width).

Post the image:

var filedata = { "file":{ "file":imageObj['base64s'][0], "filename":imageObj['names'][0], "filepath":"public://"+imageObj['names'][0], "mimeType":"image/"+imageObj['names'][0].split(".")[1], "filesize": imageObj['sizes'][0] } }; $.ajax({ url: localStorage.appurl+"/api/file.json", type: 'post', data: filedata, dataType: 'json', cache: false, headers: { 'X-CSRF-Token': localStorage.usertoken }, error: function(XMLHttpRequest, textStatus, errorThrown) { console.log('error '+errorThrown); d.reject(errorThrown); }, success: function (data) { d.resolve(data); } });

Create the node:

$.ajax({ url: localStorage.appurl+"/api/node.json", type: 'post', data: "node[title]=new node&node[type]=ftritem&node[field_ftritem_images[und][0][fid]=7895", dataType: 'json', heders: { 'X-CSRF-Token': localStorage.usertoken }, error: function(XMLHttpRequest, textStatus, errorThrown) { console.log('error '+errorThrown); }, success: function (data) { console.log("Node created"); } });

Im getting this error:

Notice: Undefined offset: 0 in image_field_widget_form() (line 358 of /var/www/dt11/modules/image/image.field.inc).

Notice: Undefined offset: 0 in file_field_widget_form() (line 526 of /var/www/dt11/modules/file/file.field.inc).

Has anyone faced this before ? Any suggestions are highly appreaciated.

david

Drupal Planet

Evolving Web: Building Websites that Win Over Prospective Students

10 hours 37 minutes ago

Universities and colleges are faced with unique goals, challenges, and opportunities around digital transformation. We often hear from folks who want to reorient their higher education websites around attracting and nurturing potential new students. I recently shared insights on how to accomplish this at the 2023 HighEdWeb Conference in Buffalo, New York, where I co-presented with Winna Tse and Vibeke Silverthorne from OCAD University.

We showcased our collaboration on OCAD U’s Admissions sites—two visually bold, accessible, interactive microsites that we designed to captivate a creative audience and streamline the application process. OCAD U saw a 21% increase in website visits and a 15% increase in applicants within a few weeks of the launch.

In this article, I’ve shared some of our best lessons and findings from the project. Read on to explore six proven ways to reach, engage, and win over prospective students.

 

1. Consider Building a Separate Microsite

According to usability research, students often select a program first before they choose which school to attend. That means it’s really important to show prospective students what programs are available and make program pages easily accessible. Many websites successfully use a program finder on their main website to funnel prospective students to their program of choice. 

But because OCAD U had information architecture issues on its main site, we recommended replacing the old admissions section with two stand-alone microsites targeted at prospective students (one for graduates, one for undergraduates). This solution brought several advantages for OCAD U’s admissions team and the wider university, which we’ll explore below.  

Targeted user experience

By capturing prospective undergraduates on a self-contained microsite, OCAD U can deliver a highly tailored digital experience. Everything from the menu navigation to the visuals are geared towards users who’re considering studying at the university. OCAD U was so happy with this approach that they commissioned a second microsite aimed at prospective postgraduates.

Streamlined updates process

Originally, the admissions team had to ask the marketing team to make content changes. Every department did this, meaning it could take 2-3 weeks for requests to reach the top of the queue. This wasn’t practical for the fast-paced nature of admissions and recruitment.

A stand-alone microsite gives the admissions team greater ownership over their content. They can make changes in a single day, enabling them to publish time-sensitive content such as deadlines reminders.

Because the microsites are built using Drupal, the admissions team has access to a powerful user roles feature for managing editing permissions. This is one of many reasons to use Drupal for higher education websites.

Possibilities for experimentation

OCAD U’s admissions website created an opportunity to experiment with the visual brand and user experience. It offers more freedom and breathing room than the main website due to its size and age. What’s more, the university can learn from the admissions website and apply lessons from its successes to the main website. 

Alternative: Program Finder

A separate microsite was the right choice for OCAD U, but another strategy is using a program finder on both the main and recruitment site to funnel users towards detailed program pages. This approach is particularly effective for institutions with multiple campus websites, as it offers a versatile starting point for program exploration. For OCAD U, the decision to go with a microsite stemmed from a lack of flexibility with the information architecture on their main site, making a microsite the obvious choice. For other institutions, the program finder funnel solution might make more sense.

2. Create Straightforward User Journeys

Because you’re competing for the time and attention of prospective students, it’s all the more important that your website serves up the information they’re looking for quickly and effortlessly. The best way to achieve this is by mapping user journeys and working out how to streamline your site architecture, search experience, and calls to action.

User Journey Mapping

We ran a user journey mapping exercise with OCAD U where we developed user personas and explored the types of interactions they had with the university. This included everything from Googling the institution, to attending an open day, to completing an application form. The process helped us uncover new opportunities to improve their journey, and allowed us to start developing wireframes and mockups.

User Mindsets

Using a less traditional approach, we also explored user mindsets. Our team identified three mindsets that any prospective student might have—whether they’re a high schooler, undergraduate, mature student, or coming from abroad: 

  1. “I don’t know what I want to study.”
  2. “I want to study art and design, but I don’t know where yet.”
  3. “I already know that I want to attend OCAD University.”

Looking into these mindsets with OCAD U helped us shape their site navigation and provide relevant, consistent CTAs. Their Discover section is aimed at the first mindset, the Afford and Visit sections at the second mindset, and the Apply section at the third mindset.

 

We helped OCAD U refine its program selectors and calls to action for a simpler user experience.

 

Want to learn more about the discovery and UX design in higher education projects? Read about our collaboration with York University’s School of the Arts, Media, Performance and Design in 5 Surprising Findings That’ll Change How You See Discovery.

3. Integrate Storytelling Throughout Your Content

Storytelling creates an emotional connection between users and your brand. The most powerful stories are authentic and value-based, showing target audiences that you care about what they care about. Storytelling isn’t just for your homepage either. Program pages are a common entry point for prospective students, so they need to promote your brand as well as the course details.

As an art, design, and media institution, OCAD U has incredible opportunities to use visual storytelling. We infused a range of student-created art throughout the university’s website. Not only does this elevate the design, it also showcases talent that reflects OCAD U’s reputation, and invites prospective students to imagine their own creative possibilities.

 

“We felt that [Evolving Web’s] aesthetic was very strong, that they could really adapt to our brand. Also, most importantly, was their thoughtful approach to storytelling.”

- Winna Tse, Communications & Projects Specialist, OCAD University 

 

Having worked with dozens of higher education institutions, our team has interviewed many prospective students about what matters to them. We’ve heard repeatedly about the importance of connecting with current students and alumni. Prospective students value hearing about real-life experiences at your university—in fact, it’s often a tipping point in their decision making process. So, don’t isolate student stories and testimonials in a corner of your website. Integrate them on every page to ensure exposure to your most persuasive content. 

 

We reimagined the application of OCAD U’s visual brand to create a striking website design. 
4. Fine-Tune Your Visual Brand

An eye-catching, memorable visual identity sets your university apart from competitors. Above all, it needs to resonate with your target audience. Building a new website is often a good opportunity to refresh your brand—but it’s possible to refine what you already have in a way that targets prospective students. 

Identify where your brand allows for flexibility, and experiment with different flavours of existing design elements. OCAD U wanted a bolder look and feel that reflects their reputation and meets the expectations of discerning young creatives. So we found ways to use their visual identity in new ways, bringing out more daring and fun aspects of the brand.

Our design team developed ‘Windows into OCAD U’, a concept that invites students to explore creative possibilities, escape the boring, and reimagine a more fantastical reality. We also used the distinctive architecture of OCAD U’s buildings as inspiration for textures and shapes, including tiled patterns, concentric squares, and boldly coloured buttons.

We communicated our vision to the client using stylescapes, a valuable tool for enhancing collaboration on art direction.

 

Stylescapes helped us communicate design ideas and get early alignment on the visual direction of the project. 
5. Help Prospective Students Apply with Confidence

If you want to increase applications from prospective students, it’s essential to make the admissions process as straightforward and welcoming as possible. A useful exercise is to identify major touchpoints in the user’s journey and find ways to provide better support and value around it. 

For OCAD U, this touchpoint was when prospective students prepared and submitted their portfolio. For other universities, it might be something like attending an open day or having an interview with faculty.

We helped OCAD U develop a dedicated page for portfolio preparation. It offers step-by-step guidance, information about requirements, creative prompts and tips, answers to common questions, and access to portfolio clinics. By providing these valuable resources, OCAD U saw an increase not only in the number of applications but also in their quality.

 

Portfolio submission is a unique aspect of OCAD U’s admissions process that required special attention.
6. Prioritize Accessibility and Inclusion 

Prospective students come from a wide range of cultures and backgrounds, and include people with disabilities and support needs. Higher education institutions need to prioritize accessibility and inclusion when building a website, ensuring that everyone has equal access to content and feels welcomed and represented.

Everything our team builds complies with WCAG 2.0 AA and relevant federal, provincial, state, or local requirements. But we encourage and guide clients to go beyond these standards with a human-centric, personalized approach to web accessibility. This can empower your organization to reach even more people and offer ever-better experiences.

It’s also important to represent your institution’s diversity into your site’s content strategy. Select website imagery that represents people of various cultures, races, ethnicities, religions, and so on that represent that diversity you would find on campus. Diversity can also mean highlighting different paths to success, such as showcasing someone who is a mature student that went to OCAD to start a second career. Prioritize plain language to help non-native speakers and users with cognitive disabilities to find the right information. Consider whether you need a multilingual website to cater to audiences such as international students.

Finally, explore ways to support prospective students from historically underserved communities. As a North American university, OCAD U has a dedicated section for indigenous applicants that provides tailored information about relevant resources, contacts, programs, scholarships and bursaries.

Meet Evolving Web, Your Digital Agency Partner

Evolving Web works with higher education organizations across North America—including Princeton University, McGill University, Georgia Tech, the University of Washington, OCAD University, Queen’s University, York University, and the University of California Berkeley.

Our experience has allowed us to develop best practices and tried-and-tested solutions that help us deliver exceptional value to our higher education clients. We create dynamic, user-centric websites to help you connect with target audiences and cultivate valuable relationships. Our team prioritizes your digital independence, giving you the tools you need to grow and evolve your digital presence.

Learn about our work with higher education clients and see what we can do for you. 

+ more awesome articles by Evolving Web

Golems GABB: Efficient Token Usage in Drupal: Practical Tips and Examples

12 hours 59 minutes ago
Efficient Token Usage in Drupal: Practical Tips and Examples Editor Thu, 03/28/2024 - 12:54

If you want hassle-free and efficient content generation and management, Drupal is the right choice. With several modules and tokens, it will help you create a dynamic and versatile data environment to cater to your audience’s needs and search engine guidelines. Lamborghini, Doctors Without Borders, and Nokia illustrate how applicable and productive this system is.
You must discover the solution’s features in more detail to get started and advance your content generation strategy. It will come in handy to lead your Drupal scenario from scratch to scratch without difficulty. Stay tuned to find out more about token implementation scenarios at your disposal. Mind the gap!