- Issue created by @pfrenssen
Thank you, I like the changes!
Some small remarks for the MR !4.
In
src/ParagraphsStats.php:556
, there's the following switch statement:switch ($rec->parent_type) { case 'node': ... case 'paragraph': ... case 'block_content': ...
As far as I can tell, there's no error handling here if the
$rec->paren_type
is none of the above cases, right? Maybe logging/throwing an error here would be an appropriate error handling.Another small remark is about the renaming of the row cells from
@id/edit
toParagraph @id
. I believe theParagraph @id
naming doesn't have enough information value, as it's very similar to the first entry of the row and doesn't convey the information that this is an edit link. Therefore I suggest keeping the@id/edit
naming or changing it to something likeEdit Paragraph @id
- 🇧🇬Bulgaria pfrenssen Sofia
As far as I can tell, there's no error handling here if the $rec->paren_type is none of the above cases, right? Maybe logging/throwing an error here would be an appropriate error handling.
The module doesn't seem to query any other entity types at the moment (ref. ::getSqlLeftJoin()) but I will add a fallback to future proof it. Logging or throwing an error message would not be useful IMO because this would alert the site owner but they cannot do anything on their end to solve this.
I believe the
Paragraph @id
naming doesn't have enough information value, as it's very similar to the first entry of the row and doesn't convey the information that this is an edit link. Therefore I suggest keeping the@id/edit
naming or changing it to something likeEdit Paragraph @id
.
Good suggestion. It is confusing that the header says "Edit link" while the links no longer lead to edit links but instead to usage reports. I will fix this.