We also need a solution for the exact same issue (possibility for admins to download files BEFORE they get published). Should I create a new ticket, or can you provide me a solution for this here in this topic?
I can confirm this solve the issue.
I downloaded Visual Studio Code, opened and saved my CSV with this editor, and import is working just fine.
I used Sublime Text before.
Thanks a lot for your help.
Great, this worked.
But how did you solved it? I have a lot more import to do (6.000 lines) – how can I get it myself to work?
For the first, yes. But maybe a solution for this should be part of the plugin by default, and a proper handling for this could be part of an update of the Advanced Custom Fields plugin. I guess other users will have the same problem.
I’ve worked-around this issue for the first, by adjusting the ./libs/class.Package.php
.
I’ve added $vars[$hematches[1][$index == ' '
to also hide entries with an space.
Like this:
foreach ($hematches[0] as $index ► $hide_empty){
$hide_empty = str_replace(array('[', ']'), '', $hide_empty);
if(!isset($vars[$hematches[1][$index
) || ( $vars[$hematches[1][$index == '' || $vars[$hematches[1][$index == ' ' || $vars[$hematches[1][$index == '0' ))
$vars[$hide_empty] = 'wpdm_hide wpdm_remove_empty';
else
$value[$hide_empty] = '';
}
I’ve added a line with a space to my Advanced Custom Fields with Type “Select”.
This is a dirty solution I think, so if you could come up with something better, I would appreciate it.
Thanks.
Any updates on this ticket?
Thanks!
That would be awesome. Thanks a lot for your help.
Yes, exactly.
I may need other categories as well in the future, but for the first only “Track” or “Car” would be enough.
Thanks.
Yes, exactly.
In the Frontend uploader first screen, people choose an upload category, and the name of the upload:
They can choose Category “Track” or “Car“. They click “Continue”.
This should avoid, that people choose values for fields which are not applicable for the choosen upload category.
The first upload screen I already changed in a way, so they can choose a category at “adb_page=add-new”. This category will then be selected in “adb_page=edit-package” already.
I hope you can provide me an easy solution for this.
Thanks!
Yes, something like this.
In short: I have a download section with different categories.
If people upload a “Track“, they have to fill out fields related to “Tracks“.
If people upload a “Car“, they have to fill out fields related to “Cars“.
Fields not applicable for the category they choose, they leave empty.
Like in this example:
This is a “Track” upload, so this “Car” related fields they keep empty:
Related url: https://www.revoltworld.net/download/thegreatsilence
In the Download page of the upload, it looks like this:
For example, one of the visible Advanced Custom Fields I configured like this:
Field Type “Select”, and one line filled with a space (” “), so not the first entry show by default:
In my custom template, I have this code section:
<li class="list-group-item d-flex justify-content-between align-items-center [hide_empty:acf_AdditionalCarInfo_carenginetype]">
[txt=Engine]
<span class="badge">[acf_AdditionalCarInfo_carenginetype]</span>
</li>
So I want to hide the “Car Engine” field, if it’s empty.
I guess it is still visible, cause a Space (” “) is inside the field.
So:
1) How can I hide fields filled with Space
2) Should I configure the Advanced Custom Field in a different way, so by default a real empty value will be choosen?
Thanks a lot for your help.
I really like your plugin, and I hope I can get it to work.
The problem is solved.
It was the plugin named “WP Hide & Security Enhancer” which caused the issue. After deinstalling this plugin, the featured image can be chosen and saved without any issues.
More specific: It was the Rewrite-path option of this plugin.
The plugin did a rewrite of the wp-files folder to “files”.
Can it be, that the wp-files folder is hardcoded within WP-DM?
Thanks for your help!
I have deactivated all plugins now and the problem is still there. So other plugins does not seems to be the issue.
I also tried to switch to a standard WordPress theme and the problem also was still there.
I have switched back to my theme again (GridHub PRO), but I kept all plugins deactivated, so you can have another look.
At your test-package (WPDM TEST) you can see the featured image was not stored. I can see your uploaded image (upload is working fine), BUT it was not stored as a featured image.
Choosing and saving the featured image via “normal” way inside wp-admin (NOT frontend uploader) works fine.
ALSO: Choosing and saving an additional image via frontend uploader also works fine! The issue is ONLY with Featured image.
Can you please have another look?