Repository navigation
Issues/696 - #353
Merged
Merged
Issues/696#353
Conversation
…or write error during import (#350)
There was a problem hiding this comment.
Pull request overview
This PR addresses several reported issues across admin UI, permissions, imports, and sanitization by adding guards, improving error handling, and expanding automated coverage (unit + Playwright E2E).
Changes:
- Add empty-file (missing header) validation for CSV/XLSX import sources and fix
AbstractSource::getTotalColumns()return value. - Gate Webhook logs UI/controller access behind permissions and add tests around the permission checks.
- Improve UI robustness (profile logo
onerror, disable AI “@” suggestions for profile image) and add related tests; add HTMLPurifier cache path + ImageCache URL fetch timeout.
Reviewed changes
Copilot reviewed 51 out of 52 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e-pw/tests/05-settings/profile-logo-broken-image.spec.js | New E2E coverage for hiding broken logo images in profile dropdown |
| tests/e2e-pw/tests/05-settings/profile-image-no-suggestions.spec.js | New E2E coverage for disabling “@” suggestions in profile AI prompt |
| tests/e2e-pw/tests/04-datatransfer/import-empty-file.spec.js | New E2E flow asserting empty XLSX import doesn’t crash PHP |
| tests/e2e-pw/assets/empty.xlsx | Fixture file for empty XLSX import scenario |
| packages/Webkul/Webhook/src/Resources/views/settings/index.blade.php | Hide logs tab/content based on configuration.webhook.logs permission |
| packages/Webkul/Webhook/src/Http/Controllers/WebhookLogsController.php | Add permission check for logs index endpoint |
| packages/Webkul/DataTransfer/tests/Unit/Helpers/Sources/EmptyFileValidationTest.php | New unit tests for empty-file validation and total column counting |
| packages/Webkul/DataTransfer/tests/Unit/Helpers/Importers/HtmlPurifierCachePathTest.php | New unit tests validating purifier cache-path configuration/sanitization |
| packages/Webkul/DataTransfer/src/Resources/lang/zh_TW/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/zh_CN/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/vi_VN/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/uk_UA/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/tr_TR/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/tl_PH/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/sv_SE/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/ru_RU/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/ro_RO/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/pt_PT/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/pt_BR/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/pl_PL/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/no_NO/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/nl_NL/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/mn_MN/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/ko_KR/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/ja_JP/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/it_IT/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/id_ID/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/hr_HR/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/hi_IN/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/fr_FR/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/fi_FI/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/es_VE/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/es_ES/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/en_US/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/en_NZ/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/en_GB/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/en_AU/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/de_DE/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/da_DK/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/ca_ES/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Resources/lang/ar_AE/app.php | Add file-empty validation translation |
| packages/Webkul/DataTransfer/src/Helpers/Sources/Excel.php | Throw localized error when header row is missing/empty |
| packages/Webkul/DataTransfer/src/Helpers/Sources/CSV.php | Throw localized error when header row is missing/empty |
| packages/Webkul/DataTransfer/src/Helpers/Sources/AbstractSource.php | Fix getTotalColumns() to return an int total, not column names |
| packages/Webkul/Core/tests/Unit/ImageCacheControllerTest.php | New unit coverage for ImageCache logo + timeout expectation |
| packages/Webkul/Core/src/Traits/HtmlPurifier.php | Configure HTMLPurifier serializer cache path under storage |
| packages/Webkul/Core/src/ImageCache/Controller.php | Add fetch timeout to prevent hanging remote requests |
| packages/Webkul/Admin/tests/Feature/Acl/Configuration/WebhookLogsAclTest.php | New feature tests for Webhook logs ACL + UI gating |
| packages/Webkul/Admin/tests/Feature/Account/ProfileImageSuggestionTest.php | New feature tests for disabling AI prompt suggestions on profile image |
| packages/Webkul/Admin/src/Resources/views/components/media/images.blade.php | Add showSuggestions prop and gate “@” icon + Tribute attach |
| packages/Webkul/Admin/src/Resources/views/components/layouts/header/index.blade.php | Hide logo image on load error via onerror |
| packages/Webkul/Admin/src/Resources/views/account/edit.blade.php | Disable suggestions for profile image component via prop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Reference
<! Please mention issue #id or use a comma if your pull request solves multiple issues. -->
Description
<! Please describe your changes in detail. -->
How To Test This?
<! Please describe in detail how to test the changes made in this pull request. -->
Documentation
<! Please describe in detail what needs to be changed. >
Branch Selection
<! Please specify the target branch for this pull request. -->
Pint
<! Please make sure all the pint tests are passed. -->
Tailwind Reordering
<! Please make sure all the Tailwind classes are reordered. -->