[SOLVED] download system borked

Post

Posted
Rating:
#6617 (In Topic #1495)

change of Category after file uploaded

Howdy,

Just experienced an unique issue perhaps. 

version: 10.0.34
PHP version: 7.3.25

Today I wanted to post a file for a download, using the form 

Add download

i posted title and then below in the upload area started uploading the 100M mp3 file... then i realized I had forgotten to select the proper catagory, so I did and I think this created the trouble, choosing this after the file upload?

hit save and error is:

PHP WARNING [2] Use of undefined constant OBFUSCATE_BIN_SUFFIX - assumed 'OBFUSCATE_BIN_SUFFIX' (this will throw an Error in a future version of PHP) in cms/pages/modules/cms_downloads.php on line 571 (version: 10.0.34, PHP version: 7.3.25-1+ubuntu16.04.1+deb.sury.org+1, URL: /cms/index.php?page=cms-downloads&type=_add&uploading=1)

now i am unable to add any downloads.

Let me know if I can provide more info and thank you in advance for any advice on this

Cheers

Stevyn

 

Last edit: by ironfeather


Post

Posted
Rating:
#6619
Hi,

It looks like a patch conflict. Try dropping in this replacement for sources/uploads.php:
https://gitlab.com/composr-foundation/composr/-/raw/master/sources/uploads.php

Post

Posted
Rating:
#6621
Hello, thanks much for reply and answer but  after a test with patch same result. 

it looks like 'editing' a download (from the past) also has same error result.

Code

PHP WARNING [2] Use of undefined constant OBFUSCATE_BIN_SUFFIX - assumed 'OBFUSCATE_BIN_SUFFIX' (this will throw an Error in a future version of PHP) in cms/pages/modules/cms_downloads.php on line 649 (version: 10.0.34, PHP version: 7.3.25-1+ubuntu16.04.1+deb.sury.org+1, URL: /cms/index.php?page=cms-downloads&type=__edit&id=55&uploading=1)


 

Post

Posted
Rating:
#6622
I wanted to mention that i have two different sites with same version of Composr running and the other site, downloads (upload to download) work fine. So somehow my changing the folder of it created the trouble

Post

Posted
Rating:
#6623
Ok thanks. I aim to get back to you later tonight. Today was a bit distracting :o .

Post

Posted
Rating:
#6624
thank you :) no rush, low priority as I can upload the old fashioned way with ftp

yes just woke up here and watched the news, total chaos there :(

Post

Posted
Rating:
#6626
Check sources/uploads.php is not overridden as sources_custom/uploads.php.

New constants were added to the file recently in this commit:

Fixed MANTIS-4463 (Upload filenames not obfuscated) (dd07ca30) · Commits · Composr ecosystem / Composr · GitLab

But seem to be missing on your site.

Post

Posted
Rating:
#6627
Hello,

ok great news, you are correct I did have a custom uploads.php I had forgotten about. I removed that and with your replacement everything works great now.

Thank you very much!!!

  

Last edit: by ironfeather


5 guests and 0 members have recently viewed this.