Skip to content
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

Resources import problems — post 2024.04 #781

Open
andyp-uk opened this issue Nov 12, 2024 · 2 comments
Open

Resources import problems — post 2024.04 #781

andyp-uk opened this issue Nov 12, 2024 · 2 comments
Labels
bug This is a bug (not an enhancement) important Not critical but should be addressed Next release Propose for February release Regression Issue that surfaced related to latest release

Comments

@andyp-uk
Copy link
Contributor

andyp-uk commented Nov 12, 2024

Replicated on 2024.10, presumably introduced by JQuery updates in 2024.04:

First problem

  1. Go to Resources > Admin > Import Configuration.
  2. Click Add import configuration.
  3. Observe modal window is blank. Press Esc to back out.
  4. In the Network tab of devtools, observe Error 500 on GET https://devtest1-erm.bc.sirsidynix.net/resources/ajax_forms.php?action=getAdminImportConfigUpdateForm&updateID=. Response data seems to truncate after Alias Sets heading.

Second problem

  1. Go to Resources > File Import.
  2. Upload a file.
  3. Observe the page stops rendering after Alias Sets heading.
  4. Select a configuration where prompted, if you have an option listed.
  5. The page seems to render properly. But where is the button to finalise the import?
@streatim streatim added Next release Propose for February release Regression Issue that surfaced related to latest release labels Nov 12, 2024
@stephanieleary
Copy link
Contributor

It's PHP 8, not jQuery. count() now throws an error if its argument isn't iterable. We have about 200 places where we check whether count($SOMETHING) > 0 without first checking that $SOMETHING is an array, which was fine before but now brings PHP to a screeching halt.

I'm going to fix this throughout in the accessibility branch.

@stephanieleary
Copy link
Contributor

stephanieleary commented Dec 10, 2024

Here is the regex pattern I've used:
search: if \(count\((\$.*) > 0\)
replace: if (is_array($1 && count($1 > 0)

@andyp-uk andyp-uk added bug This is a bug (not an enhancement) important Not critical but should be addressed labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug (not an enhancement) important Not critical but should be addressed Next release Propose for February release Regression Issue that surfaced related to latest release
Projects
None yet
Development

No branches or pull requests

3 participants