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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [BUG] - The changes in the Htaccess file, made by is_themecore, delete any changes made by other modules or customizations #370

Open
maofree opened this issue Jan 14, 2024 · 3 comments
Labels
bug Something isn't working is_themecore

Comments

@maofree
Copy link
Sponsor

maofree commented Jan 14, 2024

Description

Hi
I report a problem with is_themecore. When it does some updates into htaccess remove all extra code present at the top of htaccess

in some case there are extra modules like scaledevmanomano that add some directives
or in some cases I use

RewriteEngine on RewriteBase / RewriteRule ^shop/(.*)$ /$1 [R=301,NC,L]

because the website was inside the folder "shop"

each time I do some changes into is_themecore or from prestashop seo page, I need to add again that code inside htaccess. Without is_themecore I don't get this problem

Is it possible to reduce the range of action inside the Htaccess file?

1

thanks

Node.js version

v16

php version

8.1

OS and it's version

linux

Browsers

Chrome

Required module/theme

is_themecore

Reproduction steps

1. Go to htaccess and add an extra code at the top of it
2. push on the save button inside the is_themecore configuration page

Logs

No response

@maofree maofree added the bug Something isn't working label Jan 14, 2024
@Oksydan
Copy link
Owner

Oksydan commented Jan 15, 2024

Hi @maofree,

thank you for creating an issue.
I was able to reproduce the problem. I am adding this issue to is_themecore module roadmap.
We are not writing contentBefore during generation process.
You can add here this code here

$this->write($this->contentBefore);

This should resolve your problem.

@maofree
Copy link
Sponsor Author

maofree commented Jan 15, 2024

Hi
yes now that problem is fixed, but I've seen another little problem in that htaccess regeneration
at each saving (pushing inside the module configuration) it adds a new line at the start and a new line at the end

1
23

from one line, after two saving there are 3 lines

@Oksydan
Copy link
Owner

Oksydan commented Jan 16, 2024

Hi @maofree,

I will take a look at this when I work on is_themecore v5.
TBH it's not a big deal just a new line, it doesn't break anything, so it's like a minor problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working is_themecore
Projects
Development

No branches or pull requests

2 participants