developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
164
results
Andrew Fletcher
•
To run a SQL command using Drush, use the following sql-query command
drush sql-query "COMMAND"As an example, in the following I will remove all of the records in the Watchdog.
Delete from watchdog
To empty (clear) the watchdog table, which contains Drupal's log messages, using the above noted command. The command to delete all entries from the watchdog table is as follows:
drush sql-query "DELETE FROM watchdog"This command executes a SQL DELETE operation on the watchdog table,...
Andrew Fletcher
•
In Drupal, the logging system is based on the PSR-3 logging standard, which...
Andrew Fletcher
•
Working through the following error
Notice: Only variables should be passed by...
Andrew Fletcher
•
Using Drupal 10, VIews, Solr and Facets has post upgrade to version 10, created...
Andrew Fletcher
•
Attempting to apply a patch in Drupal 10.2.4 that had been working until this...
Andrew Fletcher
•
Drush open_basedir restriction error
PHP Warning: include(): open_basedir restriction in effect. File(/usr/share/drush/includes/startup.inc) is not within the allowed path(s): (/var/www/vhosts/{domain}/:/tmp/) in /usr/share/drush/drush on line 113
PHP Warning: include(/usr/share/drush/includes/startup.inc): Failed to open stream: Operation not permitted in /usr/share/drush/drush on line 113
PHP Warning: include(): Failed opening '/usr/share/drush/includes/startup.inc' for inclusion...
Andrew Fletcher
•
Having updated Solr, re-indexing wasn't working. The error in the logs...
Andrew Fletcher
•
Have you had the situation where you needed to compare the files recorded in the...
Andrew Fletcher
•
These steps are for Drupal 8 and 9.
Export your database
Order here is...
Andrew Fletcher
•
When reloading a page, you may encounter the following error:
Fatal error:...
Andrew Fletcher
•
Overview of the elements
Set Up API Keys
Obtain API keys for Pinecone and OpenAI.
Store the keys securely. Consider using a credentials.py file (as mentioned in a previous response).
Install Required Libraries
Install the necessary Python libraries, such as Pinecone's Python client (pinecone-client) and OpenAI's Python client (openai).
pip install pinecone-client openai
Create a Language Model Chain
Use OpenAI's language model (e.g., GPT-4) to understand and process...
Andrew Fletcher
•
The issue of over 300 simultaneous database connections in the context of AWS...
Andrew Fletcher
•
Finalising a deployment to Drupal 10 and reviewing the latest log...
Andrew Fletcher
•
The error message "Attempting to re-run cron while it is already running" in...
Andrew Fletcher
•
As you're using Bootstrap 5 and applying a style for the hover state of an...