HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Problem with my theme

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#73028 (In Topic #15301)
Avatar

Well-settled

Hey there,

I updated my site recently and am using a new download extension. I am not using ocPortal on this particular site because, well, it has always been a Joomla site with Joomla downloads for the most part and since I have a bunch of paid extensions for it I may as well use them. I have also developed some new Joomla extensions and figured I may as well use them on my own site. One of these was the download extension.

In the process my download URL for my ocPortal theme changed. It's the Dark Ritual theme. I want to update it some when I get a chance but it still seems to be working pretty well. So what I did was just add a redirect in Joomla directly to the tar file on the server. If you go to the link to download in the ocPortal themes directory on this site you can download it fine. I can download it fine from my site using this redirect link:

When I previewed that link got turned into this for some reason. {+START,IF_NON_EMPTY,{HEADER_TEXT}}{HEADER_TEXT*} - {+END}{$SITE_NAME*}

However when I try to install from within ocPortal this does not work. I get an error: Sorry, but ‘php?id=365’ files can not be uploaded.

I can see in my server access logs when this error occurs that it does indeed appear to work correctly on the server side of things. It sends a 301 redirect from the link I pasted above and then sends the file just like it should. But in my ocPortal install I get the error.

I didn't want to simply link to the file because it will have the version number in it and I will probably forget to come here and change the download link if I ever update it.

Any ideas? Maybe ocPortal doesn't handle the redirect? I have no idea where this php?id=365 comes from.

Ryan
Back to the top
 
Posted
Rating:
#73058
Avatar

Attachment
sources/files2.php
» Download: files2.php (36 Kb, 109 downloads so far)
Attachment
sources/comcode_text.php
» Download: comcode_text.php (79 Kb, 117 downloads so far)


First issue is the Comcode link detection not limiting itself to HTML mime types. Tars are uncompressed so it actually found a <title> from HEADER.tpl inside the TAR and used that.

Second issue is the redirect doesn't fill in the filename in the HTTP response, so ocPortal can't check it. I have amended it to look at the redirected location instead.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#73060
Avatar

Well-settled

Oh wicked, thanks Chris =)
Back to the top
 
Posted
Rating:
#73061
Avatar

Well-settled

Ok, so I am starting to regret not using ocPortal on that site of course. On my ocPortal site though, I replaced the 2 files you sent and I tried to import the theme again but I get the same error. Is there anything else I have to do some place perhaps? Here is a stack trace of it if it helps.

An error has occurred

Sorry, but ‘php?id=365’ files can not be uploaded.
The following file types are supported: 3gp, asf, avi, bmp, css, csv, doc, docx, eml, flv, gif, gz, ico, ini, jpeg, jpg, mov, mp3, mp4, mpeg, mpg, odg, odp, ods, odt, ogg, ogv, pdf, php, png, ppt, pptx, ps, psd, pub, qt, ra, ram, rar, rm, sql, swf, tar, tga, tif, torrent, tpl, txt, wav, webm, wmv, xls, xlsx, zip.
[ edit the list] (version: 7.1.3, PHP version: 5.3.6, URL: /adminzone/admin_addons/_addon_import.htm?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 the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ocPortal 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/example.com/public_html/sources/failure.php'
Line'669'
Function'get_html_trace'
Args 

File'/home/example.com/public_html/sources/global2.php'
Line'936'
Function'_fatal_exit'
Argsobject


File'/home/example.com/public_html/sources/failure.php'
Line'227'
Function'fatal_exit'
Argsobject


File'/home/example.com/public_html/sources/global2.php'
Line'896'
Function'_generic_exit'
Argsobject

'WARN_SCREEN'


File'/home/example.com/public_html/sources/files2.php'
Line'385'
Function'warn_exit'
Argsobject


File'/home/example.com/public_html/sources/uploads.php'
Line'239'
Function'check_extension'
Args'dload.php?id=365'

false

'/tmp/ocpfcUawy2Y'

false


File'/home/example.com/public_html/adminzone/pages/modules/admin_addons.php'
Line'247'
Function'get_url'
Args'url'

'file'

'imports/mods'

0

0

false

''

''

true


File'/home/example.com/public_html/adminzone/pages/modules/admin_addons.php'
Line'119'
Function'_addon_import'
Class'Module_admin_addons'
ObjectModule_admin_addons::__set_state(array( ))
Type'->'
Args 

File'/home/example.com/public_html/sources/zones.php'
Line'386'
Function'run'
Class'Module_admin_addons'
ObjectModule_admin_addons::__set_state(array( ))
Type'->'
Args 

File'/home/example.com/public_html/sources/site.php'
Line'962'
Function'load_module_page'
Args'adminzone/pages/modules/admin_addons.php'

'admin_addons'


File'/home/example.com/public_html/sources/site.php'
Line'749'
Function'request_page'
Args'admin_addons'

true


File'/home/example.com/public_html/adminzone/index.php'
Line'51'
Function'do_site'
Args 

Parameters

MAX_FILE_SIZE
134217728
label_for__file
Upload
require__file
0
hidFileID_file
-1
label_for__url
Download
url
http://ocportal.com/site/dload.php?id=365
_url
1
require__url
1
Back to the top
 
Posted
Rating:
#73063
Avatar

Hmm, worked for me when I tested. But I can see I didn't cover the situation where CuRL was used (if you manually forced CuRL to be used via the hidden option for that).
Attachment
» Download: files2.php (36 Kb, 98 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#73064
Avatar

Well-settled

I don't think I enabled any hidden options. I still get the error with that file.

What I did now was change the download here to a direct link to the file and just renamed the file to not have the version number in it. However, I still get the error.

 O_o
Back to the top
 
Posted
Rating:
#73065
Avatar

What, the "Sorry, but 'php?id=365' files can not be uploaded." error, even when "php?id=365" is no even in the URL you used?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#73090
Avatar

Well-settled

Back to the top
 
Posted
Rating:
#73124
Avatar

Ah, seems it didn't work, I was testing in the wrong place.

Fixed now:
Attachment
sources/files2.php
» Download: files2.php (36 Kb, 121 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
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 ocPortal whenever you see the opportunity.
  • 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 ocPortal 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.
Back to the top
 
Posted
Rating:
#73158
Avatar

Well-settled

You are a god my friend.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: