Trying to upload files to <site root>/uploads/
directory and can't find the way to pass "root" dir value to CF8.. in older versions there was {path:root}
but I can't find any docs on paths for version 8. Any help?
Yes, I found here in forum some solution to see in site's global configs the exact path, but the problem is that when I'll migrate to client's server I'll have to double check there too and fix inevitable errors there..
Ok, I've tried this and it didn't work:
But unfortunately it doesn't work for file paths.. Why?
Nope. It just doesn't work.
I've tried to generate full path with php, directory 100% exists but still get error and no file uploaded.
So, how the hell make this work??
ANYONE??
Such inconsistency between versions of your own component is just a f**king mess. And reminder on top of each forum topic to write review in Joomla extensions directory actually makes me think that I'd go there and write next NEGATIVE one.
What is the problem with reminding us about a feature/shortcode which has been missed ? there is no need for cursing or threats, does the missing shortcode means that the extension is 100% bad ?
I will add this shortcode to the next update, for now you may use Joomla global variables for this: JPATH_SITE
@Max "the problem with reminding you about a feature/shortcode" is that I need extension to work as intended right now, not waiting some future updates. Because customers, deadlines and other stuff you probably never met in your perfect Universe.
"does the missing shortcode means that the extension is 100% bad" - no, extension is 100% bad when old versions are never compatible to previous one.And I had to remake all and every your form when updated from v6 to v7 and now from v7 to v8.
Extension is good when it develops and evolves from version to version, but it is bad when something that worked for years suddenly is "forgotten" to be included into new version.
Extension is bad when free features suddenly become paid (like php code usage) after update. I can count here tens of more reasons why you make extension worse with every next version, but I hope you've got the idea.
I think that the order is not right. File upload is definitely the first action to be executed, then the PHP action.
@rbock
Believe me, I've tried ALL possible variations. Before, after, on Actions tab, {var:}, whatever. The file upload path and file naming pattern portion are just plain broken (probably only when used together, I didn't have time to play anymore), they barely work ONLY if NOT set. At the end of the day I perform php file rename() to move uploaded files from default directory to the one I prefer. This shit is broken.
I don't mean the order in the form, the order that is executed in the submit action of CF8.
Try setting a session variable when loading the form and using it in the upload $this->set and so on...
PHP ->
$X1 = $_SERVER['DOCUMENT_ROOT'] . '/images/';
$this->set("nice", "$X1");
Upload -> {var:nice}
@rbock
Here is docs how variables are passed from php part and how it's used in rest of form: https://www.chronoengine.com/faqs/chronoforms/chronoforms8/how-to-use-php-data-anywhere-in-your-formAs you may see on screenshots above, this is exactly how I do. But upload path field is plain deaf to {var:} values. And I suspect, it's deaf to any non-default values as well.
This shit is broken.
Add a hidden text field, default value {var:php12}
In the upload then {data:text_xyz}
@rbock
Seriously? show the path on SERVER for anyone curious enough to check the code of my page and read the hidden field? You've got "F" for security basics, sit down now.
I told you, upload "path" field doesn't support anything except for default or {path:front}. It's useless and broken now.
Yes, right! But now we see that it works with {data:test12}. Now you just have to adjust test12 with the path when loading.
@rbock
Have you tested your proposed solution?
{path:root} has been added to the next v8 update