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

Upgrade OpenMage : custom theme not work (solved) #1796

Closed
Danieleeffe1 opened this issue Aug 20, 2021 · 12 comments
Closed

Upgrade OpenMage : custom theme not work (solved) #1796

Danieleeffe1 opened this issue Aug 20, 2021 · 12 comments
Labels

Comments

@Danieleeffe1
Copy link

Danieleeffe1 commented Aug 20, 2021

Preconditions (*)

  1. openmage 20.0.8
  2. ubuntu server 20.04
  3. php 7.4
  4. apache 2
  5. mysql 8

Steps to reproduce (*)

  1. upgrade openmage 20.0.8 to 20.0.12 from composer 2.0

Expected result (*)

  1. normal upgrade

Actual result (*)

  1. The website not load custom file Style.css
  2. I try test assignin default theme openmage front end this works, but if i change in custom theme the file css not work .
  3. The css custom theme have a permission correct but the file not loaded
  4. if i see in frontpage the html in the head the link "stylesheet" of the theme custom (style.css) file does not exist.
  5. The custom theme is MIMIC (openmage theme section)
@luigifab
Copy link
Contributor

Perhaps it is same as #1748, from #1073. My bad.

@pauldpauld
Copy link

pauldpauld commented Aug 21, 2021

Hi,
I recently installed a full 20.0.12 using composer, not an upgrade.
I am experiencing the same difficulity, the RWD theme works fine, trying to change to any uploaded theme (with correct ownership and permissions), gives the same error of missing css.
Thanks, Paul
EDIT: Fedora 33, PHP 7.4, Apache. Cache disabled.

@Danieleeffe1
Copy link
Author

Maybe I have the temporary solution, go into categories and assign the custom style to the root category (or desired categories)

@Danieleeffe1
Copy link
Author

Here we go again, same problem

upgrade from 20.0.12 to 20.0.13

custom fears does not work, you lose the css.

Can you check for this bug that occurs every single time you update openmage?

the custom theme and a variant of rwd (Mimic) where there are only the files indicated in the repositories (still under control) present in OpenMage theme.

this time I also created a completely new thema folder independent of rwd, result: it doesn't work

@Danieleeffe1
Copy link
Author

Forse è lo stesso di #1748 , da #1073 . Colpa mia.

Hello

I read a little about the reasons for these changes.

I would like to specify that with no browser the css file of the customized theme is loaded

the custom theme is a direct descendant of RWD

apart from the css file and a few modifications of some files that do not affect the classes in any way.

the result is that themes other than rwd are not loaded.

it's a huge problem

ps: the problem recurs also with the 20.0.13 version of openmage

@addison74
Copy link
Contributor

addison74 commented Sep 2, 2021

I am interested in investigating this issue but I need to describe in detail all the your steps in reproducing it after installing from scratch OpenMage 20.0.13, including any modification in website settings. I'm sorry to comment, but the way you reported this issue is incomplete, even vaguely.

@Danieleeffe1
Copy link
Author

Danieleeffe1 commented Sep 2, 2021

thank you for your interest.

I use google translate.

I apologize for any communication difficulties.

it's been a few months so I'll tell the installation by heart

I created a server:

ubuntu 20.04
mysql 8
apache 2
php 8.x (active)
php 7.4 (active via htaccess for openmage)
php7.2
php 5.6

i have the following installation path of the websites

/ var / www /

openmage is installed in the subdirectori

/ var / www / openmage

I transferred the openmage source to the openmage folder.

as the composer installs openmage in a subdirectory with assigned name I had to copy the composer.json file in the "www" directory

script of composer.json:
{ "require": { "aydin-hassan/magento-core-composer-installer": "*", "openmage/magento-lts": "*" }, "extra": { "magento-core-package-type": "magento-source", "magento-root-dir": "openmage" } }

I assigned a "magento" user with read-write permissions to the openmage folder and the composer.json file

via ssh as user "magento" I started the command "composer update"

Composer ran its processes without errors by installing OpenMage 20.0.8 , all this to be able to upgrade OpenMage without errors via Composer in the future.

about 2 weeks ago I updated magento from 20.0.8 to 20.0.12 via "composer update" command, composer performed everything without errors.

since that moment the custom template has not worked anymore

the template can be found here:
[https://github.com/OpenMage/OpenMage-Themes/pull/1](Mimic OpenMage).

I have brought OpenMage back to version 20.0.8 with a backup file and it worked

I tried 2 days ago to update OpenMage to version 20.0.13 but it has the same problem as 20.0.12

that's all I remember doing.

ps: my server does a redis and cache cleanup every night, the error shows up after the "server restart"

@addison74
Copy link
Contributor

addison74 commented Sep 5, 2021

The fact that you use Google Translate should not have been a problem in reporting all the steps you followed in reproducing the issue. Unfortunately, you did not provide me with the information I wanted.

Here is how I tried to reproduce the problem you reported initially:

  1. I downloaded all the official OpenMage archives from the GitHub page 20.0.8, 20.0.10, 20.0.11, 20.0.12, 20.0.13 each in its own directory.

  2. I created 5 databases for each installation. I unzipped the archives and proceeded to manual installation. Except for version 20.0.8, which lacks the LICENSE.html file, the rest of the installations went smoothly.

  3. In Backend I disabled all the options in the Cache Management section. I downloaded the MIMIC theme from the page where you uploaded it and I copied the app and skin directories in all 5 installations.

  4. In Backend I went to the Settings section then to the General -> Design tab and I filled in Translations, Templates, Skin, Layout, Default with mimic word. Thus the first search starts in the rwd package and then the mimic directory.

  5. I loaded Frontend for each installation and then looked in the source code of the Home page because you reported that it does not load the custom style.css files.

OpenMage 20.0.8: I did not identify any issues
OpenMage 20.0.10: I did not identify any issues
OpenMage 20.0.11: I identified an issue. Two important css files are not loaded
OpenMage 20.0.12: the same issue as above
OpenMage 20.0.13: the same same issue as above

@addison74
Copy link
Contributor

addison74 commented Sep 5, 2021

After investigating in more detail I came to the conclusion that the Mimic theme uses layout files that have not been updated with the latest RWD version which has changes in 20.0.11.

If the /app/design/frontend/rwd/mimic/layout/page.xml file is renamed then the one in /app/design/frontend/rwd/default/layout/page.xml will be used and the CSS files are loaded. In this way the page doesn't have any issues with the layout. You can see below the proof that once the XML file name was changed, the styles.css file from mimic directory was loaded.

mimic

In conclusion, this issue report is not coming from OpenMage code but in the theme files used. Therefore it can be closed. In the future those who report issues please perform tests to allow us to start from a level not from the ground.

@Danieleeffe1
Copy link
Author

Danieleeffe1 commented Sep 5, 2021 via email

@Danieleeffe1 Danieleeffe1 changed the title Upgrade OpenMage : custom theme not work Upgrade OpenMage : custom theme not work (Resolved) Sep 6, 2021
@Danieleeffe1
Copy link
Author

Danieleeffe1 commented Sep 6, 2021

Dopo aver indagato più in dettaglio, sono giunto alla conclusione che il tema Mimic utilizza file di layout che non sono stati aggiornati con l'ultima versione RWD che presenta modifiche in 20.0.11.

Se il file /app/design/frontend/rwd/mimic/layout/page.xml viene rinominato, verrà utilizzato quello in /app/design/frontend/rwd/default/layout/page.xml e i file CSS vengono caricati . In questo modo la pagina non ha problemi con il layout. Di seguito puoi vedere la prova che una volta modificato il nome del file XML, è stato caricato il file styles.css dalla directory mimic.

imitare

In conclusione, questo rapporto sul problema non proviene dal codice OpenMage ma dai file del tema utilizzati. Quindi può essere chiuso. In futuro chi segnala problemi è pregato di eseguire dei test per permetterci di partire da un livello non da terra.

the solution you suggest is applicable only and exclusively if the custom theme is limited to being nested in RWD.

If a user wants to create a separate Theme folder from RWD the problem persists.

If there is a guideline informing web designers how to modify templates prior to opemage version 20.0.11 please leave the link.

Thanks.

(ps:To try to understand, I compared the page.xml files of mici and rwd.

The only difference is in line 69 which I have changed.

the result does not change.

People have different levels of proficiency, there are people who bought their own temlate with Magento 1.

Others (like me) build it using the original theme as a basis because they know how to use css and a bit of html

others like you (fortunately) know how to do much more.

this is to say that I would have liked to offer you a easier starting point, but not everyone can do it.
)

@Danieleeffe1 Danieleeffe1 changed the title Upgrade OpenMage : custom theme not work (Resolved) Upgrade OpenMage : custom theme not work (partially solved) Sep 6, 2021
@Danieleeffe1
Copy link
Author

Resolved

I cloned the RWD certella both in app / design / and in Skin / frontend

I changed the RWD name to the custom template name

I then copied the custom theme files without selecting the files:

/app/design/frontend/tema-custom/etc/theme.xml

And

/app/design/frontend/tema-custom/layout/page.xml

now works

@Danieleeffe1 Danieleeffe1 changed the title Upgrade OpenMage : custom theme not work (partially solved) Upgrade OpenMage : custom theme not work (solved) Sep 6, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants