Duplicate entry for key PRIMARY - in table tx_advancedsitemaps_configurations_records
When a new record is added there is an insertion happening in table "tx_advancedsitemaps_configurations_records" with an empty value.
This is due the the way the isset() works when compared to older PHP versions.
In order to avoid this, in the function processDatamap_afterDatabaseOperations() it is safer to call isset() as well as !empty() as below:
A) if(isset($this->a_fields['tx_advancedsitemaps_priority']) && !empty($this->a_fields['tx_advancedsitemaps_priority']))
B) if(isset($this->a_fields['tx_advancedsitemaps_changeFreq']) && !empty($this->a_fields['tx_advancedsitemaps_changeFreq']) )
We should also change a bit of the WHERE Clause i the function checkRecordConfigurationValue() as follows:
C) "table_name = '$s_tableName' AND record_uid = $i_recordUid AND dataType = '$s_type'"
If we omit the dataType, then the TCA will get wrong value in the function getMainFields_preProcess()
This issue mainly happens when we save the record without filling the values to the priority, or change frequency.
Hope to see this minor issue fixed in next version.
Thank you for your effort.