problem with added pdf files
Permalink
Hi,
I added links to numerous pdf files in my site. When I click on those links in Firefox on Mac they open just fine, but on PCs and Safari on Mac I get a message saying invalid file.
I want to get around using the add file feature and put absolute urls in the html code. But it seems impossible to figure out what the absolute urls are to my files in the file manager.
Anyone can help?
I added links to numerous pdf files in my site. When I click on those links in Firefox on Mac they open just fine, but on PCs and Safari on Mac I get a message saying invalid file.
I want to get around using the add file feature and put absolute urls in the html code. But it seems impossible to figure out what the absolute urls are to my files in the file manager.
Anyone can help?
can anyone else confirm this? if so lets get it posted in bugs so we don't lose it.
This has to do with logged in vs guest issue, not a browser issue from what I understand.
I don't understand your reply. Can you explain what,
"This has to do with logged in vs guest issue..."
means?
Thanks because I'm having the same problems with attached PDFs.
"This has to do with logged in vs guest issue..."
means?
Thanks because I'm having the same problems with attached PDFs.
Sorry, but I can't confirm the "invalid file" message for PDF files on Win XP. It seems to be working fine for Firefox 3.6.8, IE 7, and Chrome. I'm using C5 version 5.4.0.5. It downloads whether or not I'm logged in. I tested with both the content block and the file block.
Maybe it's something specific to your PDF file(s). Have you tried it with a PDF that you know for sure downloads ok from other sites?
Maybe it's something specific to your PDF file(s). Have you tried it with a PDF that you know for sure downloads ok from other sites?
There is nothing wrong with the PDF. There is an issue with the installation. The file is fine.
I am only able to provide the hard link to the file in order for it to download properly.
Using the link provided by content block gives me a database error or the invalid file message.
I am only able to provide the hard link to the file in order for it to download properly.
Using the link provided by content block gives me a database error or the invalid file message.
Do you have this up at a public site? If so, and if you could post the url of a page that has some of the broken PDF download links, it might help someone figure this out...
http://pinelandssoccer.org/index.php?cID=120
As long as I am logged in, I can download the file. As soon as I log out, I lose access to it.
The file is in a Public set.
As long as I am logged in, I can download the file. As soon as I log out, I lose access to it.
The file is in a Public set.
I see what you mean... It seems like a permissions issue. I think the hard link to the file is bypassing the permissions.
If you go to File Manager > Access, are guest permissions set to 'yes' for view site files? Do you have custom permissions enabled for the fileset?
It's weird that the link would work in Firefox for Mac, though -- is that still the case? I don't have a way to check that...
If you go to File Manager > Access, are guest permissions set to 'yes' for view site files? Do you have custom permissions enabled for the fileset?
It's weird that the link would work in Firefox for Mac, though -- is that still the case? I don't have a way to check that...
I only added the hard link once I was advised of the error by a user.
The file is in a public fileset. There are no custom permissions.
I'll try adding the log settings once I am able to get outside of this firewall.
The user that informed me of the download error is a windows user.
Thanks for the suggestions.
The file is in a public fileset. There are no custom permissions.
I'll try adding the log settings once I am able to get outside of this firewall.
The user that informed me of the download error is a windows user.
Thanks for the suggestions.
If the permissions look fine to you, one thing you could try is opening concrete/controllers/download_file.php in an editor and temporarily inserting some log statements inside the view function(), for example:You can check the log entries in Dashboard > Reports > Logs
Here is a log entry from this morning. It contains the file id for the PDF that errors during the download attempt.
Maybe someone can see the through all of this Greek?
Maybe someone can see the through all of this Greek?
Exception Occurred: mysql error: [1048: Column 'fID' cannot be null] in EXECUTE("insert into DownloadStatistics (fID, fvID, uID) values (NULL, 0, 0)") #0 /home/xx/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(1037): adodb_throw('mysql', 'EXECUTE', 1048, 'Column 'fID' ca...', 'insert into Dow...', false, Object(ADODB_mysql)) #1 /home/xx/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(993): ADOConnection->_Execute('insert into Dow...') #2 [internal function]: ADOConnection->Execute('insert into Dow...', Array) #3 /home/xx/public_html/concrete/libraries/database.php(73): call_user_func_array(Array, Array) #4 [internal function]: Database->__call('Execute', Array) #5 /home/xx/public_html/concrete/models/file.php(426): Database->Execute('insert into Dow...', Array) #6 /home/xx/public_html/concrete/controllers/download_file.php(66): File->trackDownload() #7 /home/xx/public_html/concrete/controllers/download_file.php(26): DownloadFileController->download(Object(File)) #8 [internal function]: DownloadFileController->view('171') #9 /home/xx/public_html/concrete/libraries/controller.php(190): call_user_func_array(Array, Array) #10 /home/xx/public_html/concrete/libraries/controller.php(169): Controller->runTask('view', Array) #11 /home/xx/public_html/concrete/libraries/view.php(600): Controller->setupAndRun() #12 /home/xx/public_html/concrete/dispatcher.php(236): View->render(Object(Page)) #13 /home/xx/public_html/index.php(2): require('/home/xx/...')
Viewing 15 lines of 16 lines. View entire code block.
I see what it's saying, but it's not making sense to me yet. Basically the flow is like this:
In the view() function of the controller download_file.php, we're receiving a positive fID, using it to get an instance of the file object, checking permissions, etc.. and everything's fine...
BUT -- when we take that file object and call its TrackDownload() method to insert a record to the stats table, the ado db library is complaining that we passed it a null fID!
Something definitely seems broken in your code. I'd probably try inserting a line like right before line 426 of file.php i.e. this:
I can't see how a File object could forget its own fID... Could there be a problem with the ADO connection?
In the view() function of the controller download_file.php, we're receiving a positive fID, using it to get an instance of the file object, checking permissions, etc.. and everything's fine...
BUT -- when we take that file object and call its TrackDownload() method to insert a record to the stats table, the ado db library is complaining that we passed it a null fID!
Something definitely seems broken in your code. I'd probably try inserting a line like
Log::AddEntry("File ID is: {$this->fID}");
I can't see how a File object could forget its own fID... Could there be a problem with the ADO connection?