Update the database directly for product SEO fields


https://forum.kartris.com/Topic1486.aspx
Print Topic | Close Window

By saturation - Fri 9 Dec 2011
I want to update the SEO fields from the backend.   I know the data is stored in tblKartrisLanguageElements.  Can someone tell what the following are supposed to equal for each of the SEO fields?

le_typeid
le_fieldid
le_parentid

The reason I'm doing it this way is a) it's faster, and b) I can't seem to save Admin/_ModifyProduct.aspx (products page) when I add any data to any of those SEO fields.

Any help is appreciated.
By Mohammad - Fri 9 Dec 2011
Doing that manually through the Language Elements is a bit complicated and confusing.


Wondering why its not saving the SEO fields for you ? I've tested that and its working as expected (Page Title, Meta Desc, Meta Keywords and URL Name) all are saved correctly!

Can you tell me what version you are using and which field(s) that are not saved ?
That will help us investigating the issue.
By saturation - Tue 13 Dec 2011
It looks like there are two errors generated when I save.   Ideas?

-----------------------------------------------------------------------------
>>    LanguageElementsBLL._UpdateLanguageElements
-----------------------------------------------------------------------------
>>    System.Data.SqlClient.SqlException
>>    12/12/2011 5:16:10 PM
>>     URL:http://www.medicouponmanager.com/Admin/_ModifyProduct.aspx?ProductID=234&CategoryID=0&strParent=
>>    98.215.65.169
>>    CUSTOM MESSAGE:
Database Error: A general error has occurred.
>>    NUMBER:1088
>>    MESSAGE:
Cannot find the object "trigKartrisLanguageElements_DML" because it does not exist or you do not have permissions.
>>    STACK:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at LanguageElementsBLL._UpdateLanguageElements(DataTable ptblElements, LANG_ELEM_TABLE_TYPE enumType, Int64 ItemID, SqlConnection sqlConn, SqlTransaction savePoint)
==================================================



-----------------------------------------------------------------------------
>>    ProductsBLL._UpdateProduct
-----------------------------------------------------------------------------
>>    System.ApplicationException
>>    12/12/2011 5:16:10 PM
>>     URL:http://www.medicouponmanager.com/Admin/_ModifyProduct.aspx?ProductID=234&CategoryID=0&strParent=
>>    98.215.65.169
>>    CUSTOM MESSAGE:
Error occurred while processing the operation.
>>    MESSAGE:
Error occurred while processing the operation.
>>    STACK:
   at ProductsBLL._UpdateProduct(DataTable ptblElements, String pParentsList, Int32 pProductID, Boolean pLive, Byte pFeatured, String pOrderVersionsBy, Char pVersionsSortDirection, Char pReviews, Char pVersionDisplayType, Int32 pSupplier, Char pProductType, Int32 pCustomerGroupID, String& strMsg)
==================================================
By saturation - Tue 13 Dec 2011
I was just able to fix it by copying the trigger over from my test copy of Kartris.   

However, I have 250+ products.   Can you steer me in the right direction for at least querying for the SEO fields?
By Mohammad - Wed 14 Dec 2011
You can use the query attached in this post.