• Resolved rplinux

    (@rplinux)


    Hi,

    I just export code snippets from one site in json and try to import in another site, but got error ‘An error occurred when processing the import file.’ each time.

    When I check on choose file and when window opens it do not display json files, I then select all from file type dropdown. then it will show json file.

    Actually it is not working.
    Please help how to import code snippets json file.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Same Here, Export/Import Not Working

    Plugin Author Shea Bunge

    (@bungeshea)

    Hey,

    I changed a few things around with the import process in version 2.10.1, so if you were able to test it out and let me know whether these issues are still occurring, I would really appreciate it. Thanks.

    Thread Starter rplinux

    (@rplinux)

    @bungeshea Thanks.

    It is importing json file now. But file type filter not showing json when we click on choose file to import. We need to select all file type.

    Could you add feature which prevent deletion of snippets from database when we delete this plugin. As if some one don’t know and accidentally delete this plugin then we will lose all the snippets.

    Right now documentation says when we delete this plugin it will delete all the data completely.

    Please provide hook as well as admin option.

    Plugin Author Shea Bunge

    (@bungeshea)

    Can I ask the version of the web browser and operating system you are using? The file type select feature is a HTML5 feature which may not be properly supported in all browsers – it seems to be working fine for me, but that may not be the case for you if you are using a different web browser.

    That’s a good idea. Perhaps I will add a checkbox to the settings page that will need to be checked in order for Code Snippets to clean up all its data after being deleted. I will make sure it is included in the next version.

    Thread Starter rplinux

    (@rplinux)

    @bungeshea I am using windows 7 with chrome latest version.
    I have set default editor to sublime which open this json file.
    I can see you have set file type accept attribute to
    accept=’application/json,text/xml’
    I think application/json not working. Please add this
    accept=”application/json,.json,text/xml”
    It is working now with this accept attributed.

    Plugin Author Shea Bunge

    (@bungeshea)

    Oh, really? I didn’t realise you could simply use file extensions with the accept attribute. Well, thank you for that, it will be fixed in the next release.

    Thread Starter rplinux

    (@rplinux)

    @bungeshea

    I am getting this type error when activation some plugin on saving date at backend.

    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 3
    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 5
    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 3
    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 5
    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 3
    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 5
    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 3
    
    Warning: Attempt to modify property of non-object in /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code on line 5
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code:3) in /home/content/13/11505113/html/7/bitmainwp/wp-admin/includes/misc.php on line 1114
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/content/13/11505113/html/7/bitmainwp/wp-content/plugins/code-snippets/php/snippet-ops.php(352) : eval()'d code:3) in /home/content/13/11505113/html/7/bitmainwp/wp-includes/pluggable.php on line 1216
    
    Plugin Author Shea Bunge

    (@bungeshea)

    Hi @rplinux,

    This error is being caused by one or more of your snippets – it looks like you are using the $variable->property syntax when $variable isn’t a proper PHP object on lines three and five of one or more snippets.

    • This reply was modified 7 years, 1 month ago by Shea Bunge.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Import not working’ is closed to new replies.