Stack trace - when replacing logo

Post

Posted
Rating:
#8673 (In Topic #2905)
Avatar
Standard member
friendly is in the usergroup ‘Community saint’
Just installed a new install of Composr. Downloaded the quick installer. Everythiing went well. A refreshing experience after my problems with Softaculous lately.

But after using the setup wizard, I opened up the site. Still a positive experience. First thing I want to do is change the default composr logo with my own logo. So I try but I run into an error which produced a stack trace. any idea what I need to do to proceed?

Here it is:

An error has occurred

The uploaded file (Logo_Website_Blue_Baby_115x980.png) could not be moved to its target destination (themes/default/images_custom/logo/logo/-logo.png) (version: 10.0.43, PHP version: 7.4.30, URL: /adminzone/index.php?page=admin-themes&type=_edit_image&keep_fatalistic=1&uploading=1)

You have turned on stack traces for all errors, via having keep_fatalistic=1 in the URL. This means that this may not actually be a fatal error, you have just asked for it to be presented as such (perhaps to help you find where it came from).

Here is the stack trace:

Below is a stack trace revealing the state Composr was in when the error occurred. If this represents a bug in the unmodified software, you may want to check Composr website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File '/home/aidlf/public_html/sources/failure.php'
Line 1,043
Function 'get_html_trace'
Args  
File '/home/aidlf/public_html/sources/global2.php'
Line 1,074
Function '_fatal_exit'
Args

Tempcode -> The uploaded file (<kbd>Logo_Website_Blue_Baby_115x980.png</kbd>) could not be moved to its target destination (<kbd>themes/default/images_custom/logo/logo/-logo.png</kbd>) (version: 10.0.43, PHP version: 7.4.30, URL: /adminzone/index.php?page=admin-themes&amp;type=_edit_image&amp;keep_fatalistic=1&amp;uploading=1)

File '/home/aidlf/public_html/sources/failure.php'
Line 400
Function 'fatal_exit'
Args

Tempcode -> The uploaded file (<kbd>Logo_Website_Blue_Baby_115x980.png</kbd>) could not be moved to its target destination (<kbd>themes/default/images_custom/logo/logo/-logo.png</kbd>)

File '/home/aidlf/public_html/sources/global2.php'
Line 1,058
Function '_generic_exit'
Args

Tempcode -> The uploaded file (<kbd>Logo_Website_Blue_Baby_115x980.png</kbd>) could not be moved to its target destination (<kbd>themes/default/images_custom/logo/logo/-logo.png</kbd>)

'WARN_SCREEN'

false

File '/home/aidlf/public_html/sources/uploads.php'
Line 939
Function 'warn_exit'
Args

Tempcode -> The uploaded file (<kbd>Logo_Website_Blue_Baby_115x980.png</kbd>) could not be moved to its target destination (<kbd>/home/aidlf/public_html/themes/default/images_custom/logo/logo/-logo.png</kbd>)

File '/home/aidlf/public_html/sources/uploads.php'
Line 400
Function '_get_upload_url'
Args

2

'file'

'themes/default/images_custom/logo'

'/home/aidlf/public_html/themes/default/images_custom/logo'

15

0

false

'logo/-logo.png'

File '/home/aidlf/public_html/adminzone/pages/modules/admin_themes.php'
Line 2,172
Function 'get_url'
Args

'path'

'file'

'themes/default/images_custom/logo'

0

15

false

''

''

false

false

false

false

2

'/home/aidlf/public_html/themes/default/images_custom/logo'

'/home/aidlf/public_html/themes/default/images_custom/logo'

'logo/-logo.XXX'

File '/home/aidlf/public_html/adminzone/pages/modules/admin_themes.php'
Line 395
Function '_edit_image'
Class 'Module_admin_themes'
Object O:19:"Module_admin_themes":4:{s:5:"title";O:8:"Tempcode":5:{s:18:"code_to_preexecute";a:1:{s:33:"tcpfunc_62f33dc460ae48.85936256_1";s:2737:"$tpl_funcs['tcpfunc_62f33dc460ae48.85936256_1']=$KEEP_TPL_FUNCS['tcpfunc_62f33dc460ae48.85936256_1']=recall_named_function('62f33dc460af16.49821001','$parameters,$cl',"extract(\$parameters,EXTR_PREFIX_ALL,'bound'); echo (isset(\$bound_ID)?(\"\n<a id=\\"title__\".(empty(\$bound_ID->pure_lang)?@htmlspecialchars(otp(isset(\$bound_ID)?\$bound_ID:null,\"SCREEN_TITLE:ID\"),ENT_QUOTES | ENT_SUBSTITUTE,get_charset()):otp(isset(\$bound_ID)?\$bound_ID:null,\"SCREEN_TITLE:ID\")).\"\\"></a>\n\"):''),\n \"\n\n<h1 class=\\"screen_title\\"\",\n ((ecv_NOT(\$cl,array(),array(ecv_GET(\$cl,array(),array(\"name_set_elsewhere\"))))==\"1\")?(\" itemprop=\\"name\\"\"):''),\n \">\n \",\n otp(isset(\$bound_TITLE)?\$bound_TITLE:null,\"SCREEN_TITLE:TITLE\"),\n \"\n\n \",\n (isset(\$bound_AWARDS)?(\"\n \".((otp(isset(\$bound_AWARDS)?\$bound_AWARDS:null,\"SCREEN_TITLE:AWARDS\")!='')?(\"\n \".ecv(\$cl,array(),4,\"SET\",array(\"AWARDS_TEXT\",\"\n <h2>\".ecv(\$cl,array(),2,\"AWARD_WINNER\",array()).\"</h2>\n <p class=\\"lonely_label\\">\".ecv(\$cl,array(),2,\"AWARDS_WON\",array(otp(isset(\$bound_AWARDS)?\$bound_AWARDS:null,\"SCREEN_TITLE:AWARDS\"))).\"</p>\n <ul>\n \".closure_loop(array(\"AWARDS\",'vars'=>\$parameters),array(\$parameters,\$cl),\nrecall_named_function('62f33dc4608560.51769420','\$parameters,\$cl',\"extract(\\$parameters,EXTR_PREFIX_ALL,'bound'); return \\"\\n <li>\\n <strong>\\".(empty(\\$bound_AWARD_TYPE->pure_lang)?@htmlspecialchars(otp(isset(\\$bound_AWARD_TYPE)?\\$bound_AWARD_TYPE:null,\\"SCREEN_TITLE:AWARD_TYPE\\"),ENT_QUOTES | ENT_SUBSTITUTE,get_charset()):otp(isset(\\$bound_AWARD_TYPE)?\\$bound_AWARD_TYPE:null,\\"SCREEN_TITLE:AWARD_TYPE\\")).\\"</strong>\\n <span>\\".ecv(\\$cl,array(),2,\\"AWARD_ON\\",array(ecv_DATE(\\$cl,array(1),array(\\"1\\",\\"1\\",\\"1\\",otp(isset(\\$bound_AWARD_TIMESTAMP)?\\$bound_AWARD_TIMESTAMP:null,\\"SCREEN_TITLE:AWARD_TIMESTAMP\\"))))).\\"</span>\\n </li>\\n \\";\")).\"\n </ul>\n \")).\"\n <a href=\\"\".ecv_PAGE_LINK(\$cl,array(1),array(\"_SEARCH:awards\")).\"\\"><img onmouseover=\\"if (typeof window.activate_tooltip!='undefined') activate_tooltip(this,\".\"event,\".\"'\".ecv_GET(\$cl,array(2,8,1),array(\"AWARDS_TEXT\")).\"',\".\"'auto',\".\"null,\".\"null,\".\"false,\".\"true);\\" title=\\"\\" alt=\\"\".ecv(\$cl,array(),2,\"AWARD_WINNER\",array()).\"\\" src=\\"\".ecv_IMG(\$cl,array(1),array(\"awarded\",\"0\",\"admin\")).\"\\" /></a>\n \"):'').\"\n \"):''),\n \"\n</h1>\n\n\",\n (isset(\$bound_SUB)?(\"\n <div class=\\"title_tagline\\">\n \".otp(isset(\$bound_SUB)?\$bound_SUB:null,\"SCREEN_TITLE:SUB\").\"\n </div>\n\"):''),\n \"\n\";");";}s:9:"seq_parts";a:1:{i:0;a:1:{i:0;a:5:{i:0;s:33:"tcpfunc_62f33dc460ae48.85936256_1";i:1;a:3:{s:5:"_GUID";s:32:"847ffbe4823eca6d2d5eac42828ee552";s:6:"AWARDS";N;s:5:"TITLE";O:8:"Tempcode":5:{s:18:"code_to_preexecute";a:1:{s:36:"do_runtime_62f3416412d466.81338765_5";s:109:"$tpl_funcs['do_runtime_62f3416412d466.81338765_5']="echo ecv(\$cl,array(),2,\"EDIT_THEME_IMAGE\",array());"; ";}s:9:"seq_parts";a:1:{i:0;a:1:{i:0;a:5:{i:0;s:36:"do_runtime_62f3416412d466.81338765_5";i:1;a:0:{}i:2;i:2;i:3;s:16:"EDIT_THEME_IMAGE";i:4;s:0:"";}}}s:19:"preprocessable_bits";a:0:{}s:9:"pure_lang";b:1;s:8:"codename";s:10:":container";}}i:2;i:1;i:3;s:0:"";i:4;s:0:"";}}}s:19:"preprocessable_bits";a:0:{}s:9:"pure_lang";N;s:8:"codename";s:12:"SCREEN_TITLE";}s:2:"id";N;s:5:"theme";N;s:4:"file";N;}
Type '->'
Args  
File '/home/aidlf/public_html/sources/zones.php'
Line 853
Function 'run'
Class 'Module_admin_themes'
Object O:19:"Module_admin_themes":4:{s:5:"title";O:8:"Tempcode":5:{s:18:"code_to_preexecute";a:1:{s:33:"tcpfunc_62f33dc460ae48.85936256_1";s:2737:"$tpl_funcs['tcpfunc_62f33dc460ae48.85936256_1']=$KEEP_TPL_FUNCS['tcpfunc_62f33dc460ae48.85936256_1']=recall_named_function('62f33dc460af16.49821001','$parameters,$cl',"extract(\$parameters,EXTR_PREFIX_ALL,'bound'); echo (isset(\$bound_ID)?(\"\n<a id=\\"title__\".(empty(\$bound_ID->pure_lang)?@htmlspecialchars(otp(isset(\$bound_ID)?\$bound_ID:null,\"SCREEN_TITLE:ID\"),ENT_QUOTES | ENT_SUBSTITUTE,get_charset()):otp(isset(\$bound_ID)?\$bound_ID:null,\"SCREEN_TITLE:ID\")).\"\\"></a>\n\"):''),\n \"\n\n<h1 class=\\"screen_title\\"\",\n ((ecv_NOT(\$cl,array(),array(ecv_GET(\$cl,array(),array(\"name_set_elsewhere\"))))==\"1\")?(\" itemprop=\\"name\\"\"):''),\n \">\n \",\n otp(isset(\$bound_TITLE)?\$bound_TITLE:null,\"SCREEN_TITLE:TITLE\"),\n \"\n\n \",\n (isset(\$bound_AWARDS)?(\"\n \".((otp(isset(\$bound_AWARDS)?\$bound_AWARDS:null,\"SCREEN_TITLE:AWARDS\")!='')?(\"\n \".ecv(\$cl,array(),4,\"SET\",array(\"AWARDS_TEXT\",\"\n <h2>\".ecv(\$cl,array(),2,\"AWARD_WINNER\",array()).\"</h2>\n <p class=\\"lonely_label\\">\".ecv(\$cl,array(),2,\"AWARDS_WON\",array(otp(isset(\$bound_AWARDS)?\$bound_AWARDS:null,\"SCREEN_TITLE:AWARDS\"))).\"</p>\n <ul>\n \".closure_loop(array(\"AWARDS\",'vars'=>\$parameters),array(\$parameters,\$cl),\nrecall_named_function('62f33dc4608560.51769420','\$parameters,\$cl',\"extract(\\$parameters,EXTR_PREFIX_ALL,'bound'); return \\"\\n <li>\\n <strong>\\".(empty(\\$bound_AWARD_TYPE->pure_lang)?@htmlspecialchars(otp(isset(\\$bound_AWARD_TYPE)?\\$bound_AWARD_TYPE:null,\\"SCREEN_TITLE:AWARD_TYPE\\"),ENT_QUOTES | ENT_SUBSTITUTE,get_charset()):otp(isset(\\$bound_AWARD_TYPE)?\\$bound_AWARD_TYPE:null,\\"SCREEN_TITLE:AWARD_TYPE\\")).\\"</strong>\\n <span>\\".ecv(\\$cl,array(),2,\\"AWARD_ON\\",array(ecv_DATE(\\$cl,array(1),array(\\"1\\",\\"1\\",\\"1\\",otp(isset(\\$bound_AWARD_TIMESTAMP)?\\$bound_AWARD_TIMESTAMP:null,\\"SCREEN_TITLE:AWARD_TIMESTAMP\\"))))).\\"</span>\\n </li>\\n \\";\")).\"\n </ul>\n \")).\"\n <a href=\\"\".ecv_PAGE_LINK(\$cl,array(1),array(\"_SEARCH:awards\")).\"\\"><img onmouseover=\\"if (typeof window.activate_tooltip!='undefined') activate_tooltip(this,\".\"event,\".\"'\".ecv_GET(\$cl,array(2,8,1),array(\"AWARDS_TEXT\")).\"',\".\"'auto',\".\"null,\".\"null,\".\"false,\".\"true);\\" title=\\"\\" alt=\\"\".ecv(\$cl,array(),2,\"AWARD_WINNER\",array()).\"\\" src=\\"\".ecv_IMG(\$cl,array(1),array(\"awarded\",\"0\",\"admin\")).\"\\" /></a>\n \"):'').\"\n \"):''),\n \"\n</h1>\n\n\",\n (isset(\$bound_SUB)?(\"\n <div class=\\"title_tagline\\">\n \".otp(isset(\$bound_SUB)?\$bound_SUB:null,\"SCREEN_TITLE:SUB\").\"\n </div>\n\"):''),\n \"\n\";");";}s:9:"seq_parts";a:1:{i:0;a:1:{i:0;a:5:{i:0;s:33:"tcpfunc_62f33dc460ae48.85936256_1";i:1;a:3:{s:5:"_GUID";s:32:"847ffbe4823eca6d2d5eac42828ee552";s:6:"AWARDS";N;s:5:"TITLE";O:8:"Tempcode":5:{s:18:"code_to_preexecute";a:1:{s:36:"do_runtime_62f3416412d466.81338765_5";s:109:"$tpl_funcs['do_runtime_62f3416412d466.81338765_5']="echo ecv(\$cl,array(),2,\"EDIT_THEME_IMAGE\",array());"; ";}s:9:"seq_parts";a:1:{i:0;a:1:{i:0;a:5:{i:0;s:36:"do_runtime_62f3416412d466.81338765_5";i:1;a:0:{}i:2;i:2;i:3;s:16:"EDIT_THEME_IMAGE";i:4;s:0:"";}}}s:19:"preprocessable_bits";a:0:{}s:9:"pure_lang";b:1;s:8:"codename";s:10:":container";}}i:2;i:1;i:3;s:0:"";i:4;s:0:"";}}}s:19:"preprocessable_bits";a:0:{}s:9:"pure_lang";N;s:8:"codename";s:12:"SCREEN_TITLE";}s:2:"id";N;s:5:"theme";N;s:4:"file";N;}
Type '->'
Args  
File '/home/aidlf/public_html/sources/site.php'
Line 1,290
Function 'load_module_page'
Args

'adminzone/pages/modules/admin_themes.php'

'admin_themes'

Tempcode -> …

File '/home/aidlf/public_html/sources/site.php'
Line 976
Function 'request_page'
Args

'admin_themes'

true

'adminzone'

NULL

false

false

Tempcode -> …

File '/home/aidlf/public_html/adminzone/index.php'
Line 59
Function 'do_site'
Args  

Parameters

theme
default
lang
EN
MAX_FILE_SIZE
536870912
old_id
logo/-logo
label_for__id
Codename
id
logo/-logo
require__id
1
image
on
label_for__file
Upload
hidFileID_file
163228471
file
1
label_for__path
URL
http_referer
csrf_token
3f6f8900e9bc9


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Business Art Gallery
powered by ocPortal
Online now: No Back to the top

Post

Posted
Rating:
#8676
Avatar
Standard member
friendly is in the usergroup ‘Community saint’
I have tried a few things and still have not gotten over step one in replacing the default logo with my own logo.

Not being able to achieve this with what once was a convenient and easy process I have tried to FTP the new logo directly into the *themes/mythemename/images/EN/logo/ * directory. That didn't work. So I changed the name of the logo to match the default logo. That didn't work either. I tried using the Manage Themes tools to edit theme image(s). This way of editing the logos in the directory showed my custom logo was there - and I selected my logo and saved my selection. I got the "your action was successful " message. Even when I went to the "edit this theme image" it took my to my custom image! See attached image.

But when I click home and look for the logo change, it is no different with the default logo still there. See attached image.

Yes, I even used the cleanup tools for theme images but no changes


your action was succesful.png


Shows no change in logo.png


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Business Art Gallery
powered by ocPortal
Online now: No Back to the top

Post

Posted
Rating:
#8677
Avatar
Site staff
Adam Edington is in the usergroup ‘Super-moderators’
Hi,

You seem to be using a custom theme, so perhaps adding the logo the custom theme may solve this if you haven't done so already. Perhaps the change is only applied to the default theme currently?
Online now: No Back to the top

Post

Posted
Rating:
#8678
Avatar
Standard member
friendly is in the usergroup ‘Community saint’
I have come to the end of all I know to do with the exception of deleting all default logos (maybe that's the next thing to try?). Here are screenshots to illustrate what is going on.


First you can see where the LOGO is on the server… /themes/Dark_lightgray/images/EN/logo/-logo.png


screenshot_inspect_LOGO.png

Then I go to FTP and see what the logo called "-logo.png" looks like by using the VIEW option…


screenshot_FTP_LOGO_in Directory.png


So just incase there might be something else affecting my new logo being blocked from appearing, I go to THEMES and look at my new theme (Dark_lightgray) and pick logo. Just to make sure the uploaded logo is the one designated to be used is select that logo and save it. I get the succesful action message.


screenshot_theme_chosen_LOGO_my_theme.png


Not to miss doing the same to the DEFAULT theme I choose my uploaded LOGO (which has a different name - and is not indicated on the inspection shown in the first screenshot) and save it, getting a success message. but in the end nothing has changed and Composr refuses to regard any of the paths taken to get my LOGO pasted across the top of my page.


screenshot_theme_chosen_LOGO_default_theme.png



So then, I'm left with the questions… is there something wrong with Composr, or my server, or some settings, or what? Is there the hope of help in solving this issue? I will add, this has not been a pleasant path, as in my previous use of ocPortal products.


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Business Art Gallery
powered by ocPortal
Online now: No Back to the top

Post

Posted
Rating:
#8679
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hello,

My apologies for this bug and the delay getting a fix.

The fix is in 0004741: More sensible adding of new theme images - Composr CMS feature tracker
The adminzone/pages/modules/admin_themes.php just needs replacing from the one in the hot-fix.
Or if prefer, you can just grab the same file from here:
https://gitlab.com/composr-foundation/composr/-/raw/f61acf45c1b05a516c715855b17001df81b08059/adminzone/pages/modules/admin_themes.php

Thank you for your detailed posts. I'll try and step through what you said with some explanation as to what happened with what you tried…

1) Uploading to themes/mythemename/images/EN/logo/ with the same filename as the default logo (-logo.png or -logo.jpg) should work in principle. You need to empty the "Theme images" cache from Admin Zone > Tools > website cleanup tools too. Composr won't search for theme images on every page view, it relies on the cache for performance. I know you said you tried that, perhaps you didn't get the dash right or something.

2) Any file with a new name not corresponding to a current theme image will be picked up in the system as a new theme image. So you will see them for editing, but they are a new theme image with no relation whatsoever with any other theme image. Re-saving won't change this.

3) It looks like you maybe also had an issue with the browser caching the file (I saw you downloaded it and it didn't match what you saw on the site). That's unusual. Some webhosts do add aggressive caching to their server configuration.

Cool logo btw.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#9365
Avatar
Standard member
friendly is in the usergroup ‘Community saint’


Chris Graham said

The fix is in 0004741: More sensible adding of new theme images - Composr CMS feature tracker
The adminzone/pages/modules/admin_themes.php just needs replacing from the one in the hot-fix.
Or if prefer, you can just grab the same file from here:
https://gitlab.com/composr-foundation/composr/-/raw/f61acf45c1b05a516c715855b17001df81b08059/adminzone/pages/modules/admin_themes.php



How do I apply the hotfix?


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Business Art Gallery
powered by ocPortal
Online now: No Back to the top

Post

Posted
Rating:
#9374
Avatar
Site director
Patrick Schmalstig is in the usergroup ‘Administrators’

friendly said



Chris Graham said

The fix is in 0004741: More sensible adding of new theme images - Composr CMS feature tracker
The adminzone/pages/modules/admin_themes.php just needs replacing from the one in the hot-fix.
Or if prefer, you can just grab the same file from here:
https://gitlab.com/composr-foundation/composr/-/raw/f61acf45c1b05a516c715855b17001df81b08059/adminzone/pages/modules/admin_themes.php



How do I apply the hotfix?

On 0004741: More sensible adding of new theme images - Composr CMS feature tracker

Scroll down to the comment by Admin. Download the TAR file. Extract it into your Composr installation, replacing files from the TAR over your current files.

  • Need support for version 10? The core development team is no-longer offering it for free (unless it's a critical bug that breaks your entire site or a serious security hole). Please consider hiring me instead if you need v10 support or a non-critical bug fix. Or, ask the community in the forums!
  • Do you enjoy Composr? Please consider contributing your talent to the project or recommending Composr to others. Even small contributions make a big impact in the Composr community.
  • Do you have feedback for us? You can report bugs, suggest features, or give feedback on the Free support options page.
  • Do you need professional service with your Composr website? Please consider contracting me for your needs through my company, PDStig, LLC. Doing so will also help fund Composr development.
  • Want to watch live streams of me developing Composr CMS? Please subscribe to me on Twitch to be notified when I stream. Composr development streams are usually spontaneous / not scheduled in advance as work priorities come first.
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top