Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incorrect Usage of ABSPATH which breaks sites using custom WordPress install paths #114

Closed
timnolte opened this issue Jan 27, 2024 · 2 comments · Fixed by #115
Closed

Incorrect Usage of ABSPATH which breaks sites using custom WordPress install paths #114

timnolte opened this issue Jan 27, 2024 · 2 comments · Fixed by #115

Comments

@timnolte
Copy link

The code here:

https://github.com/BoldGrid/library/blob/master/src/Library/Start.php#L181-L187

doesn't work properly to determine the actual WordPress path when WordPress Core is installed in an alternative place. This causes major plugin broken UI issues as CSS & JS assets can't be loaded properly. This should be using WordPress Core methods for determining paths & URLs.

The issue was originally reported here: BoldGrid/boldgrid-backup#546

@timnolte
Copy link
Author

FYI, doing some testing and what is working is the following code:

                if ( ! empty( $configs['libraryDir'] ) ) {
                        $configs['libraryUrl'] = plugin_dir_url( $configs['libraryDir']  . '/src' );   
                }

@bwmarkle
Copy link
Contributor

@timnolte thanks for the bug ticket! Currently reviewing...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants