OK, I accept

This site uses cookies. By using this site, you acknowledge and accept this.

Your basket is empty
Login not logged in

Full Knowledgebase Listing

SEO fields in the back end don't save correctly.

[#45] Last update 17 Jan 2014

In some cases, the meta-description and meta-keywords fields in the back end don't retain their values. The page-title field generally works ok. This appears to be related to language element records, though we've had trouble recreating the issue to find the exact cause.

The issue should be fixed by running the following code as a 'new query' on the database with SQL Management Studio:

-- SCRIPT START 
--DISABLE TRIGGER trigKartrisLanguageElements_DML ON dbo.tblKartrisLanguageElements;
DECLARE @TID as tinyint,  @PID as bigint;
DECLARE curT CURSOR FOR 
SELECT LET_ID
FROM dbo.tblKartrisLanguageElementTypes
	
OPEN curT
FETCH NEXT FROM curT INTO @TID
	
WHILE @@FETCH_STATUS = 0
BEGIN
	DECLARE @LinkCount as int;
	SELECT @LinkCount = COUNT(1)
	FROM tblKartrisLanguageElementTypeFields
	WHERE LET_ID = @TID;
		
		DECLARE curP CURSOR FOR
		SELECT LE_ParentID
		FROM dbo.tblKartrisLanguageElements
		WHERE LE_TypeID = @TID 
		Group By LE_ParentID
		Having COUNT(1) < @LinkCount
			
		OPEN curP
		FETCH NEXT FROM curP INTO @PID
		
		WHILE @@FETCH_STATUS = 0
		BEGIN
				
			INSERT INTO dbo.tblKartrisLanguageElements
			SELECT 1, @TID, LEFN_ID, @PID, NULL
			FROM dbo.tblKartrisLanguageElementTypeFields
			WHERE LET_ID = @TID AND 
			LEFN_ID NOT IN (SELECT LE_FieldID FROM dbo.tblKartrisLanguageElements
			WHERE LE_LanguageID = 1 AND LE_TypeID = @TID AND LE_ParentID = @PID)
			
			FETCH NEXT FROM curP INTO @PID;
		END
		
		CLOSE curP
		DEALLOCATE curP;
		
	FETCH NEXT FROM curT INTO @TID;
END
CLOSE curT
DEALLOCATE curT;
--ENABLE TRIGGER trigKartrisLanguageElements_DML ON dbo.tblKartrisLanguageElements;
-- SCRIPT END 

If you are using a version before Kartris v2.0, you will have to uncommented the top and bottom lines (DISABLE and ENABLE triggers).

Powered by kartris