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

Wrong autoload template registry file path in Web Asset Registry #44178

Closed
pinta83 opened this issue Oct 2, 2024 · 6 comments · May be fixed by #44980
Closed

Wrong autoload template registry file path in Web Asset Registry #44178

pinta83 opened this issue Oct 2, 2024 · 6 comments · May be fixed by #44980

Comments

@pinta83
Copy link
Contributor

pinta83 commented Oct 2, 2024

Steps to reproduce the issue

Change "administrator" folder in "/includes/defines.php" and "/administrator/includes/defines.php" to "admin"
rename "administrator" folder to "admin"

Expected result

Everything working

Actual result

Error 500 - There is no "template.atum.ltr" asset of a "preset" type in the registry.

System information (as much as possible)

Joomla 5.x

Additional comments

Change "addTemplateRegistryFile" function in /libraries/src/WebAsset/WebAssetRegistry.php to:

    /**
     * Helper method to register new file with Template Asset(s) info
     *
     * @param   string   $template  The template name
     * @param   integer  $client    The application client id
     *
     * @return  self
     *
     * @since  4.0.0
     */
    public function addTemplateRegistryFile(string $template, int $client): self
    {
        switch ($client) {
            case 0:
            case 1:
                $this->addRegistryFile(str_replace(JPATH_ROOT . '/', '', JPATH_THEMES) . '/' . $template . '/joomla.asset.json');
                break;
            default:
                break;
        }

        return $this;
    }
@pinta83
Copy link
Contributor Author

pinta83 commented Oct 2, 2024

Fix for issue... Rename to php
WebAssetRegistry.txt

@fgsw
Copy link

fgsw commented Oct 9, 2024

@pinta83 If the issue is fixed it should be closed.

@pinta83
Copy link
Contributor Author

pinta83 commented Oct 9, 2024

It's not fixed, I only offered a solution. Still needs to be implemented / merged with Joomla...
I tried to do a pull request, but sadly I can't - since I'm not a contributor (anymore).

@brianteeman
Copy link
Contributor

I tried to do a pull request, but sadly I can't - since I'm not a contributor (anymore).

Anyone can make a pull request https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

@Hackwar Hackwar added the bug label Nov 28, 2024
@joomdonation
Copy link
Contributor

@Fedik Could you please look at this when you have a moment? Thanks.

@Fedik
Copy link
Member

Fedik commented Feb 23, 2025

Please test #44980

@Fedik Fedik closed this as completed Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants