-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Errors for relationship subfields are not detected to set the active tab correctly #5686
Comments
Hello there! Thanks for opening your first issue on this repo! Just a heads-up: Here at Backpack we use GitHub Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. Backpack communication channels:
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. Thank you! -- |
Hey @krjohnston Yes, It does not take to the error field tab, but it highlights the tab where the error is with the details on top: |
I agree the error is shown, but this is inconsistent behaviour compared to
all other fields. My client insisted that I rectify this which I did,
however I believe this is a bug that ought to be addressed in the core.
…On Sun, 13 Oct 2024, 16:06 Karan Datwani, ***@***.***> wrote:
Hey @krjohnston <https://github.com/krjohnston>
Yes, It does not take to the error field tab, but it highlights the tab
where the error is with the details on top:
Screenshot.2024-10-13.at.8.35.28.PM.png (view on web)
<https://github.com/user-attachments/assets/4024d9dc-2b96-46d3-a17f-335ae4d7d372>
—
Reply to this email directly, view it on GitHub
<#5686 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCDJIANCPGJJRYMVJ3B2H3Z3KEAFAVCNFSM6AAAAABPUB5LKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBZGAYTIMJZHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey @krjohnston totally agree. It's a simple change, are you willing to submit the PR for it, so you show up as a contributor since you already did all the work ? Thanks for the heads up, and for providing the solution 🙏 |
I don’t mind submitting the pull request.
Am I able to branch your repo or do I need to fork?
Thanks
Kev
From: Pedro Martins ***@***.***>
Date: Monday, 14 October 2024 at 10:11
To: Laravel-Backpack/CRUD ***@***.***>
Cc: krjohnston ***@***.***>, Mention ***@***.***>
Subject: Re: [Laravel-Backpack/CRUD] [Bug] Errors for relationship subfields are not detected to set the active tab correctly (Issue #5686)
Hey @krjohnston<https://github.com/krjohnston> totally agree.
It's a simple change, are you willing to submit the PR for it, so you show up as a contributor since you already did all the work ?
If you don't have time/desire to do it, just let me know and I create the PR myself. 👍
Thanks for the heads up, and for providing the solution 🙏
—
Reply to this email directly, view it on GitHub<#5686 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABCDJIC7GO4PPJU7ESKFAOTZ3ODCVAVCNFSM6AAAAABPUB5LKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJQGUZTIMZYGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hey @krjohnston thanks 🙏 |
Fixed here #5690 Thanks @krjohnston |
Bug report
What I did
Added tabbed panels for relationship with subfields in setupUpdateOperation
What I expected to happen
When the first error is on a relationship subfield, I expect that tab to be the active tab
What happened
The subfield was not recognised because the crud field in the array returned from
$crud->getCurrentFields()
isinspectorAllocations
but the$fieldName
under test isinspectorAllocations.0.name
.What I've already tried to fix it
I published
show_tabbed_fields.blade.php
and added apreg_split
to obtain the parent name of any subfields before checking the array of available$fieldName
sThis works for my case and does not have any adverse effect on standard format fieldNames
Is it a bug in the latest version of Backpack?
After I run
composer update backpack/crud
I am on 6.7.39 and the bug is still there.Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:PHP VERSION:
8.2.18
PHP EXTENSIONS:
Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, imap, intl, ldap, exif, msgpack, mysqli, pcov, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, swoole, Zend OPcache, xdebug
LARAVEL VERSION:
10.48.3.0
BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.3.0
backpack/crud: 6.7.39
backpack/devtools: 3.1.0
backpack/editable-columns: 3.0.8
backpack/generators: v4.0.4
backpack/permissionmanager: 7.2.1
backpack/pro: 2.1.11
backpack/theme-tabler: 1.2.8
The text was updated successfully, but these errors were encountered: