Categories
CMS Joomla Mastering Development

How to set article options and associations programmatically?

I work on a custom Joomla 3 module that creates articles programmatically based on user input. I can create the articles, but I could not find a way to set the article options and associations when the article is created. I found this article on where the options are stored in the Joomla DB, but […]

Categories
Development

BEGIN TRY and EXECUTE dynamic simple query error

when I execute attached query I get error: Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded. When try-catch is commented then it works, same when other column is used. When partition by is removed it also works. Can someone say […]

Categories
Development

FOREING KEY references invalid

CREATE TABLE MEDICO ( DNIMedico CHAR(9) NOT NULL, NumeroColegiado VARCHAR(200) NOT NULL, Nombre VARCHAR(200) NOT NULL, FechaNacimiento DATE NOT NULL, CONSTRAINT pk_MEDICO PRIMARY KEY (DNIMedico) ) CREATE TABLE PACIENTE ( DNIPaciente CHAR(9) NOT NULL, Nombre VARCHAR(200) NOT NULL, Direccion VARCHAR (200) NOT NULL, Edad INT NOT NULL, Peso FLOAT NOT NULL, Altura FLOAT NOT NULL, […]

Categories
CMS Development Joomla

How to programmatically write Joomla article customs field values?

I added some custom fields to the articles of my Joomla website: I work on a custom Joomla module that creates new articles programmatically using the below code: static function createArticle(GNGLocation $loc, GNGLang $lang, $title, $alias, $intro, $summary, $imageStr) { $table = JTable::getInstance(‘Content’, ‘JTable’, array()); $jcat = $loc->get(‘jcat_id_tour’); $jlang = $lang->get(‘joomlaName’); $data = array( ‘catid’ […]

Categories
Development

Powershell restore database

Trying to get a script put together that will run and search a location for the most recent database file and restore that to an SQL Server. I have the search function working well but I am unable to get it to restore the database. import-module sqlps #update path for to actual backup location $path […]

Categories
CMS Development Joomla

How to get back the ID of programmatically created Joomla Article?

I work on a custom Joomla module that creates articles programmatically. I use the below code to create the article. It all works fine. Now I would need to get back the ID of the newly create article so that I can store it for future use. I checked the bind, check, store functions, but […]

Categories
Development

Where condition for value equals to zero in firestore. The condition returns empty list

I have a collection of customer in firestore. Each customer contains a state 0 for Inactive , 1 for active. When I use where query for state == 0 it returns nothing and state == 1 returns all the customers. If I do use other fields in where condition like email,phone,country and other state like […]

Categories
Database Development

Error “The DELETE statement conflicted with the REFERENCE constraint” during database deploy with Azure DevOps

I am trying to deploy several database changes by using a database deployment job in Azure DevOps. This is after the Pipeline has successfully created a build. The database deployment job consists of the following tasks: Initialize job Download artifact Drop Publications SQL DB Deploy Restore Publications copy Finalize Job Tasks 1-3 complete successfully, but […]