Skip to content

Fix 'Class QUICKAL\QuickAL not found' error on case-sensitive file systems#25

Closed
jrgong420 wants to merge 1 commit into
dbkode:masterfrom
jrgong420:fix-class-not-found-error
Closed

Fix 'Class QUICKAL\QuickAL not found' error on case-sensitive file systems#25
jrgong420 wants to merge 1 commit into
dbkode:masterfrom
jrgong420:fix-class-not-found-error

Conversation

@jrgong420

Copy link
Copy Markdown

Hey there!

I ran into an issue when trying to activate the plugin on a Linux server (WordPress 6.7) - it was throwing a "Class 'QUICKAL\QuickAL' not found" error.

The problem is that the class is named QuickAL (uppercase "AL") but the file is class-quickal.php (lowercase "al"), which works fine on Windows/Mac but breaks on case-sensitive file systems like Linux.

This PR fixes it by:

Making the autoloader case-insensitive
Adding some fallback mechanisms to ensure the class loads
Creating a properly cased file version
I've tested it on my Linux server and it works perfectly now!

Let me know if you need any clarification or have questions!

@dbeja dbeja left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jrgong420,

Thank you for the PR and catching this bug!
Although you have a good solution that works it also adds some additional complexity and it's harder to maintain and might trigger some issues in the future.
I rather just rename the file to class-QuickAL.php as that's the root cause of the problem.

I can push those changes and trigger a new release on the plugin.
Would you like to change this PR to have that and I'll use your PR for the next version?

Thank you again!
David

@jrgong420

Copy link
Copy Markdown
Author

Hey David, you can just go ahead and implement it your way, we can close this PR :)

@dbeja

dbeja commented May 2, 2025

Copy link
Copy Markdown
Member

@jrgong420 would you be available to test the PR #27? Thanks

@jrgong420

Copy link
Copy Markdown
Author

@dbeja let me out myself, I had an AI tool actually do the PR, maybe it was obvious, maybe not ;)
But I will test it, of course.

@dbeja

dbeja commented May 2, 2025

Copy link
Copy Markdown
Member

No worries :) I appreciate the effort.
Do you know how to test this branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants