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

Recompile the frontend assets for usage in a sub-directory #635

Closed
bdrayer opened this issue Mar 11, 2019 · 10 comments · Fixed by #636
Closed

Recompile the frontend assets for usage in a sub-directory #635

bdrayer opened this issue Mar 11, 2019 · 10 comments · Fixed by #636
Milestone

Comments

@bdrayer
Copy link

bdrayer commented Mar 11, 2019

Thanks a lot for your software, the old version was practical, the new one look amazing.

I need to use Kimai in a sub-directory because I don't want to use a second IP only for this (it's on SSL).

I tried to to follow the documentation located at https://www.kimai.org/documentation/developers.html but has I didn't know all this framework and libraries that you use, it's a little bit difficult to "recompile the frontend".

First of all you said I must modify the variable "setPublicPath) that is actually set to "/build/". Do I need to put "/kimai/" if the directory after the root of my website is "kimai"?
Second, there is also a variable "setOutputPath", do I need to change it (because there is also the "build" inside)?
Third and I hope last question, when I run "bin/console kimai:test-unit", "bin/console kimai:test-integration" or even "bin/phpunit" I get an error that the file is missing (and it's the case on the file system). Where can I obtain this file?

Best regards

@kevinpapst
Copy link
Member

I tried again and probably found a fix, which removes the necessity of recompiling the assets.
Can you please help testing if this branch fixes your problem #635

Regarding the second question:
when you run composer with the --no-dev flag, than phpunit is not installed, as it is only a requirement for development mode. In production this library is not included.
Use composer install instead.

@bdrayer
Copy link
Author

bdrayer commented Mar 11, 2019

Hi,

I will be happy to test this. How do I install this branch with GIT?

Thanks dor the answer regarding composer, I will remind this for next time if needed.

Best regards

@kevinpapst
Copy link
Member

You might need to revert local changes first, especially in the files that I changed in the PR (like webpack.config.js)
You can test if you have changes with git status.
If you have changes, you can revert them with for each file with git reset webpack.config.js.

Then change to your directory where you cloned Kimai and execute:

git fetch
git checkout assets

@bdrayer
Copy link
Author

bdrayer commented Mar 11, 2019

Hi,

OK I run the commands but it don't seems to make something (or even not verbose).

When I connect, I get an old day web page without any formatting 👍
image

@kevinpapst
Copy link
Member

How did you install Kimai?
Please post the output of the command git status

@bdrayer
Copy link
Author

bdrayer commented Mar 11, 2019

Hi,

I used the GIT installation from the documentation using my own version of apache (because I need it for the rest of the website)

The command output is :
root@portal:/var/www/portal/time.new# git status
Actuellement sur aucun branche.
Modifications qui ne seront pas validées :
(utilisez "git add ..." pour mettre à jour ce qui sera validé)
(utilisez "git checkout -- ..." pour annuler les modifications dans la copie de travail)

    modifié :         composer.json
    modifié :         composer.lock
    modifié :         symfony.lock

@bdrayer
Copy link
Author

bdrayer commented Mar 11, 2019

I didn't change myself this files, ...

@kevinpapst
Copy link
Member

git reset composer.json
git reset composer.lock
git reset symfony.lock
git fetch origin
git checkout assets

@kevinpapst
Copy link
Member

I tried it locally and it seems to work. I will merge it tonight and you can wait for the next release.
Or you try to add the changes manually, if git is currently the problem on your end.

@lock
Copy link

lock bot commented May 11, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators May 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants