Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
When I install mayo theme and go to Screen settings, in "Layout Settings" section the images are not showing. Looking in the code, the problem is in relative path. The code is in this absolute path:
http://127.0.0.1/sites/all/themes/mayo/images/page-layout.png
but the correct (in my case) would be:
http://127.0.0.1/mysite/sites/all/themes/mayo/images/page-layout.png
We would like to know what file, and what line, we can change this.
Thank you
Comment | File | Size | Author |
---|---|---|---|
print.png | 35.75 KB | wescleyteixeira |
Comments
Comment #1
mermentau CreditAttribution: mermentau commentedI think you should look into how the site itself is configured in your hosting environment. Looks like you are in localhost on your PC. I have it that way also. It's an xampp set up on Windows 7. Try looking in your apache httpd-vhosts.conf file and see if you have it set up properly.
The MAYO code is good and works as is for localhost and hosted VPS.
Comment #2
riedel.andre@gmail.com CreditAttribution: riedel.andre@gmail.com commentedI am using your theme at a share hoster. To administrate the site I use the https-proxy of the hoster.
normal address: www.website.com
via proxy: ssl-proxy.com/www.website.com
I can confirm the behaviour, wescleyteixeira mentioned.
For Example in the file "templates/page.tpl.php" at line 109-111 the dash should be deleted.
before:
after:
Comment #3
joachim CreditAttribution: joachim commentedThere should not be an initial / here! url() should always be used to generate URLs!
Upping to major -- the admin UI is broken on sites in subfolders.
Comment #5
mermentau CreditAttribution: mermentau commentedJust committed fix suggested by joachim in #3 for all admin UI images. Thanks for your help.
Comment #6
mermentau CreditAttribution: mermentau commentedComment #8
maxlife58 CreditAttribution: maxlife58 commentedNot fixed for me, i update from 1.3 to 2.4, all works well only the image path on admin screen doesn't work! The problem is with a multilanguage site because mayo search the image in en/sites/all..... insetad of sites/all....
How can i fix???
Thanks
Comment #9
GStegemann CreditAttribution: GStegemann commentedThe same here.
The following is found in the webserver log:
On multilanguage sites the path to the images should not include the language code.
Comment #10
GStegemann CreditAttribution: GStegemann commentedComment #11
mermentau CreditAttribution: mermentau commentedI have no experience with multilanguage sites so any ideas how I could duplicate the issue?
Comment #12
maxlife58 CreditAttribution: maxlife58 commentedHi Mermentau, to reproduce this error you can activates the module Locale that is part of Drupal core, then download and activates the Internationalization module, now add a new language from configuration / Languages / Add Language.
Now the first page of your site will be xxx.com/en or xxx.com/it (if for example the second language is Italian). Then you can visit MAYO setting to see if the error is replicated.
Comment #13
GStegemann CreditAttribution: GStegemann commentedHow about using file_create_url?
Tested and looks working.
Comment #14
maxlife58 CreditAttribution: maxlife58 commentedThank you GStegemann, change "url" with "file_create_url" in MAYO theme-settings.php works fine for me.
Thanks
Comment #15
maxlife58 CreditAttribution: maxlife58 commentedI suggest to change with file_create_url the Header watermark line in page.tpl.php in templates folder, without this change the watermark header selected in MAYO settings are not displayed.
Comment #16
mermentau CreditAttribution: mermentau commented@maxlife58, Are you sure there is not something else in addition to your #12 above. Quick try and it's not working. I would like to test the solution myself.
Never mind I have it working now.
Comment #17
mermentau CreditAttribution: mermentau commentedChanged to file_create_url() in 6 lines in theme-settings.php and one line in page.tpl.php as suggested #13 and #15. Committed the changes to the dev version so testing would be appreciated. Modified my test site to be multilingual and tested there with good result.
Thanks for reporting and the help.
Comment #18
GStegemann CreditAttribution: GStegemann commentedYou're welcome. And many thanks for your fixes.
I already made the changes today on my site. I can test the dev version most probably tomorrow.
Comment #19
GStegemann CreditAttribution: GStegemann commentedTested and works for me.
Comment #20
maxlife58 CreditAttribution: maxlife58 commentedTested and works for me too.
Thanks
Comment #21
mermentau CreditAttribution: mermentau commentedFix added to 7.x-2.5 release.