Ordering in mysql query giving syntax error

Hi,

I am trying to order my query like so:

$query = db_query("SELECT * FROM `heritage_source_info`WHERE text_id = :textid AND format = :format ORDER BY type ASC", [':textid' => $textid, ':format' => 'text'])->orderBy('FIELD(type,moolam,translation,commentary)');

$available_sources_text = $query->fetchAll();

But it says call to an undefined function orderBy(). Could you help me with the correct syntax?

Thanks

How To Create A Node In Drupal 8 Using RESTful Web Services

Hi Team,

I have tried to create node Using RESTful Web Services, I have done the following steps.

Enabled the following 4 core modules in Drupal:

   1.   HAL

   2.   HTTP Basic Authentication

   3.   RESTful Web Services

   4.   Serialization

   5.   Enabled the one Rest UI module.

Set the proper permissions for authenticated users to be able to create, edit, and delete content.

We have to add the following headers for this call:

Apache Rewrite Rule Help

All -

I have a site that I want to remove the www from the URL and force HTTPS. 

Here are the cases I want my rule(s) to work for

HELP Update failure out of date module stuck @ update.php

Hi everyone hope someone can help me.

So I'm fairly new to drupal and have only worked in 8.x

I have 2 very basic sites that I've been using to learn drupal.

I'm updating manually at the moment not using composer or drush.

So I started updating to 8.9 everything went really smoothly until I got stuck at update.php i have, error found PATHAUTO

Then it says not compatible blah blah blah.

The problem is how do i update PATHAUTO from here or remove it for now.

Thanks for any help 

Ian

reCAPTCHA v2 error

Hi all,

I'm 1 week new to drupal and just trying to set up my website. I've implemented reCAPTCHA v2 and whilst the validation check passes, I get the following error on all forms that I submit which have reCAPTCHA enabled: The website encountered an unexpected error. Please try again later.

Full error trace can be found here - couldn't paste it all in the chat: https://pastebin.com/cMyq4zsS

Any ideas that can point me in the right direction are much appreciated.

Troubles with images in Drupal 9.0

In Drupal 9.0.0 on Linux, I put an image in a table with the following code:

<table border="1" cellpadding="1" cellspacing="1" style="width: 500px;">
    <tbody>
        <tr>
            <td><img alt="" data-align="left" data-entity-type="file" data-entity-uuid="13ecc590-47c3-45d0-9af8-9cdbf87813aa" height="205" src="/kacb9/web/sites/default/files/inline-images/KACB-logo_HORIZ_BG-COLOR_crop_0.jpg" width="266" /></td>
            <td>
            <h2>Our Mission</h2>

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x