Show
Empty url check
# Go to user profile and click edit profile
scroll down to Description
use "Insert/edit an audio/video file" button
In "Link" tab, leave source URL input field empty, and click submit, you should see a warning: "A media must have a URL.", start to type in source URL input field, then click away from it, the warning should go disappear
In "Video" tab, leave source URL input field empty, and click submit, you should see a warning: "A media must have a URL.", start to type in source URL input field, then click away from it, the warning should go disappear
In "Audio" tab, leave source URL input field empty, and click submit, you should see a warning: "A media must have a URL.", start to type in source URL input field, then click away from it, the warning should go disappear
don't refresh the page yet, do the duplicate ids check below:
make sure no duplicate HTML ids from atto editor
Open browser's developer console and copy paste the code blow:
function getAllDuplicateIds() {
const elements = [...document.querySelectorAll('[id]')];
const ids = elements.map((el) => el.id);
const dups = elements.filter((el) => ids.filter((id) => id === el.id).length > 1);
return dups.map((el) => {
return { id: el.id, el };
});
}
var dups = getAllDuplicateIds();
if (dups.length > 0) {
console.error('found duplicate ids');
console.table(dups);
} else {
console.info('📗: all good');
}
Press "Enter", then you should be able to see this output: