Plugin

Archived
Forum
(read-only)

Dropex

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yoursort

     

Problem with installation / authentication

Bug Report

FCGRX
FCGRX

Just installed Dropex, followed installation instructions (including creating a new Dropbox app), and pasted the first code example from your documentation into a new template:

{exp:dropex:files base_folder="/"}
    
<ul>
    
{files}
        
<li>{image_small} <a href="{link}">{name}</a{if size}({size}){/if} {if time}{time}{/if}</li>
    
{/files}
    
</ul>
{/exp:dropex:files} 

But when I run this I get this error:

A PHP Error was encountered

Severity
Warning

Message
file_put_contents(/Applications/MAMP/htdocs/ee_system/expressionengine/third_party/dropex/tokens/woqeweoon51vwyb.token): failed to open streamNo such file or directory

Filename
dropex/pi.dropex.php

Line Number
167

Could not store token
Make sure that the directory `tokensexists and is writable

Would be nice if the error could be trapped in your code, and a clearer / more immediate error message generated?

I assume this is because the directory I’m referring to doesnt exist yet, because the folder isn’t yet created in my dropbox apps directory. I assume the folder is created after authentication happens, but authentication can’t happen because Dropex is failing to find… the folder. Just guessing here though. Any suggestions?

FCGRX
# 1
FCGRX

Update:

Figured it out. Dropex was looking for a folder called “tokens” in the same folder as pi.dropex.php and was failing because it wasn’t there.

Seems like you should ship the plugin with the folder, and mention in the docs that the folder is required and must be write-enabled?

Lars Bilke
# 2
Developer
Lars Bilke

Thanks for the hint. I will update the docs and will also include the folder in the zip.