GithubHelp home page GithubHelp logo

export's People

Contributors

exophunk avatar lindseydiloreto avatar mrolefes avatar rutgerbakker7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

export's Issues

Export Field list doesn't update after adding new fields to Entry Type

Craft: 2.6.2944
Export: 0.5.10

Section Name: Products (Channel)
Entry Type(s): GenInfo, Notes

Field Group1: Summary, Description, Yadda0
Field Group2: Notes, Yadda1, Yadda2
Field Group3: MetaTitle, MetaDesc, MetaKeys

Initial Section->EntryType setup = Products->GenInfo
Fields = Group1

Initial Section->EntryType setup = Products->Notes
Fields = Group2

VERY FIRST EXPORT:
If I export Products->GenInfo->Ascending, all Group1 fields are available on "Choose which fields.." screen. All good.

If I add Field Group2 to Products->GenInfo, then go through exact same Export as first export:
Products->GenInfo->Ascending - the Field Group2 fields do NOT display in "Choose which fields..." screen.

If I change Export settings to Products->GenInfo->Descending - the Field Group2 fields DO display in "Choose which fields..." screen.

If I change Export settings to Products->ALL->(Ascending|Descending) the Field Group2 fields DO display...

From my extensive tests, it seems like the "Choose which fields..." screen is "caching" based on the first Export settings selected??? I've cleared cache, removed & added fields and field groups, removed and added data to fields, etc.
No matter what I change in the Fields or Sections, the "Choose which fields..." screen doesn't update to reflect those changes.

I see the _export_map.settings and _export_map.map values and can verify that the .map JSON "checked:" values DO update based on which fields I check for each Export test.

I removed all the rows in _export_map, started a new Export with same settings as VERY FIRST EXPORT above and the Group2 fields DO display.
Then ran through the full export, removed a field from the Products->GenInfo entry type and headed back to Exports... STILL shows in the "Choose which fields..." screen.

RESULTS OF EXTENSIVE TESTING:
The list of available Export fields DOES NOT update when fields are added/removed from the Section's EntryType. UNLESS I empty the _export_map table.

Locale support

Hi,
I have entries in FR (French) and EN (English).
I tried to export and then import but it only imports the default locale for the entry.

How can I import all locales?

Thank you for your time.

Export stalls PHP / Server...

Seems while im exporting the page is not responsive...as the export can take more than a couple of minutes...thats not so cool.

Getting Image URLS

This isn't actually an issue but more of a comment. I modified ExportService.php to get the URL of images. I'll leave it here and perhaps it will help someone else. Thanks for the code, bro.

public function parseFieldData($handle, $data)
{

    // Do we have any data at all
    if (!is_null($data)) {

        // Get field info
        $field = craft()->fields->getFieldByHandle($handle);

        // If it's a field ofcourse
        if (!is_null($field)) {

            // For some fieldtypes the're special rules
            switch ($field->type) {

                case ExportModel::FieldTypeAssets:
					// Show names
					if( $data instanceof ElementCriteriaModel)
					{
						//$imgSettings = array("mode"=> 'crop',
						//"width" => "1600",
						//"height"=> "230",
						//"position" =>  "center-center");

						$firstImage = $data->first();
						if(isset($firstImage)){
							$image =$firstImage->getUrl();
							$data =$image;
						}
					}

                    break;
                case ExportModel::FieldTypeEntries:
                case ExportModel::FieldTypeCategories:
                case ExportModel::FieldTypeUsers:
                case ExportModel::FieldTypeTags:
                    // Show names
                    $data = $data instanceof ElementCriteriaModel ? implode(', ', $data->find()) : $data;
                    break;

                case ExportModel::FieldTypeLightswitch:
                    // Make data human readable
                    switch ($data) {

                        case '0':
                            $data = Craft::t('No');
                            break;

                        case '1':
                            $data = Craft::t('Yes');
                            break;

                    }
                    break;

                case ExportModel::FieldTypeTable:
                    // Parse table checkboxes
                    $table = array();
                    if (is_array($data)) {
                        foreach ($data as $row) {

                            // Keep track of column #
                            $i = 1;

                            // Loop through columns
                            foreach ($row as $column => $value) {

                                // Get column
                                $column = isset($field->settings['columns'][$column]) ? $field->settings['columns'][$column] : (isset($field->settings['columns']['col'.$i]) ? $field->settings['columns']['col'.$i] : array('type' => 'dummy'));

                                // Keep track of column #
                                ++$i;

                                // Parse
                                $table[] = $column['type'] == 'checkbox' ? ($value == 1 ? Craft::t('Yes') : Craft::t('No')) : $value;
                            }
                        }
                    }

                    // Return parsed data as array
                    $data = $table;
                    break;

                case ExportModel::FieldTypeRichText:
                case ExportModel::FieldTypeDate:
                case ExportModel::FieldTypeRadioButtons:
                case ExportModel::FieldTypeDropdown:
                    // Resolve to string
                    $data = (string) $data;
                    break;

                case ExportModel::FieldTypeCheckboxes:
                case ExportModel::FieldTypeMultiSelect:
                    // Parse multi select values
                    $multi = array();
                    if (is_array($data)) {
                        foreach ($data as $row) {
                            $multi[] = $row->value;
                        }
                    }

                    // Return parsed data as array
                    $data = $multi;
                    break;

            }
        }

        // Get other operations
        craft()->plugins->call('registerExportOperation', array(&$data, $handle));
    } else {

        // Don't return null, return empty
        $data = '';
    }

    // If it's an object or an array, make it a string
    if (is_array($data)) {
        $data = StringHelper::arrayToString(ArrayHelper::filterEmptyStringsFromArray(ArrayHelper::flattenArray($data)), ', ');
    }

    // If it's an object, make it a string
    if (is_object($data)) {
        $data = StringHelper::arrayToString(ArrayHelper::filterEmptyStringsFromArray(ArrayHelper::flattenArray(get_object_vars($data))), ', ');
    }

    return $data;
}

postDate and expiryDate

postDate and expiryDate only seem to bring out the date. Is it possible to bring out the time as well?

Error when exporting link field

When creating an export of content with a link field an error is thrown.

mb_strlen() expects parameter 1 to be string, object given

`
/vagrant/craft/app/helpers/ArrayHelper.php(236)

224 // Private Methods
225 // =========================================================================
226
227 /**
228 * The array_filter() callback function for filterEmptyStringsFromArray().
229 *
230 * @param string $val
231 *
232 * @return bool
233 */
234 private static function _isNotAnEmptyString($val)
235 {
236 return (mb_strlen($val) != 0);
237 }
238 }`

The problem is that the link field contains objects like the Craft\ElementCriteriaModel object that are getting passed to the filterEmptyStringsFromArray method.
I think these should already be filtered out before passing it to the ArrayHelper class.

Downloaded filename issue.

Hi

Have a strange issue with the file that is downloaded. When trying to open it in excel I get the following error:

The file format and extension of export.csv don't match The file could be corrupted or unsafe. When I proceed it tells me it is an SYLK file and can't be opened by excel.

Any ideas?

Data dumps onto page and task hits timeout.

I am looking for some direction and I do see that the Todo’s in the readme include "Handle large exports more smoothly” which is my issue.

I have around 2k entries in a channel and when I try to export the entries, after a couple minutes of thinking about it, I get a dump of the comma delimited data and this error Fatal error: Maximum execution time of 0 seconds exceeded in ...craft/app/models/BaseModel.php on line 282
<--Not a ton of backend experience. I see line 282 is merging model attribute arrays, which I figure is the bulk of the work of plugin...

Exporting Users with Checkboxes field is blank

I'm using Export to export a users list which is working great for all custom user fields except a custom field of type Checkboxes, column values are blank in resulting CSV although column heading is present. Seems to be supported from looking at the code?

Issues using title* as field handles

Hi there.

I've just had issues exporting data which uses fields beginning with title. e.g. titlePrefix, titleName. The exported data included these columns but not the data so the exported data was under the incorrect columns.

The cause is in services/Export_EntryService.php line 162. For now I've just renamed my field handles but a fix would be great.

"Entries" fields and "Users" fields are blank in the CSV export

Somehow exporting "Entries" fields and "Users" fields are empty in our CSV exports. We need the entry Title for the Entry relation and the username or first/last name for the User relation.

Would be cool if the field mapper will let us choose which field of the related entry should be exported by the way.

-- Thijs

Exporting x entries / users

When testing the export on a lot of entries (10000 in our client scenario) the export will crash. Craft can't handle that much data and will give a memory exceeded message. Is there a chance you'll come up with a solution where the users is able export the data into several parts?

Alternative separator

First off really handy plugin.

Would it be possible to change/choose the separator from a comma to something like a pipe?
Reason being I have commas in some of my category names which is causing an issue.

Thanks

CSRF Issue

I've added and installed the plugin fine, but when I try to access the exporter I get the error:

'Internal Server Error

The function "getCsrfInput" does not exist'

I've tried enabling 'enableCsrfProtection' => true in settings which did not fix the problem, so not too sure if there is anything else within Craft that the exporter is dependant on? Or reasons that may cause this?

Export plugin takes down entire page...

...while exporting.

Not so clever. I know its probably because PHP / Apache runs on one thread.....still....not good.
Maybe for that process into own process?

Export URI of entries

Right now there is no possibility to export the URI just the slug?
This would make heaps of sense :)

Losing EntryType setting when going back in browser

The EntryType dropdown isn't repopulating based on user's selection when you go back in the browser.

Steps to reproduce:

  1. Fill out step 1 and click Next
  2. Click back in the browser
  3. EntryType dropdown shows invalid options for the repopulated Section dropdown (shows the first Section's options)
  4. Click Next
  5. Get error: "Undefined index: entrytype"

Field being ignored

I have a Plain Text field as part of an entry that does not show in the Export Configuration. I have changed the Field Name, I have also recreated the field and cleared the cache.

What could cause a field to be omitted? The field is in use.

Duplicate content from table fields

I'm exporting values for multiple fields, some plain text (which works fine), and some table fields. In the CSV, for any table fields, the values of each row are added to the CSV cell twice.

For example, if I have a table field such as this:

Length Width Height
1 2 3

...it would export to the CSV like this:

1, 2, 3, 1, 2, 3

Am I missing a step, or can you give me any instruction on how to fix this? Thanks!

Charset and Umlauts

Hi Bob, I have a little question,

When I export data with Umlauts (ä, ü, ö), they don't get displayed correctly when I open the CSV file in excel. Is there any place where I can define the correct charset (UTF-8?) to use or something, so this doesn't happen? I am using a custom export service, so could I add something there?

Thanks...

Craft\EntryModel.date is not defined.

Hello Sir.
I am using the 0.5.7 version of craft export plugin.
When I tick the fields Post Date or Expiry date of entries to export.
After clicking the export it gives error >> Craft\EntryModel.date is not defined.

export_plugin_issue_foronlydates

Exporting single entries

Hello there,

Thank you for this great tool.

Is there a way of exporting single entries?

Maybe I'm missing something.

Thank you for your time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.