dsawardekar / wordpress.vim

Vim Plugin for WordPress Development
MIT License
166 stars 17 forks source link

Errors on starting Vim #15

Closed tnorthcutt closed 10 years ago

tnorthcutt commented 10 years ago

As mentioned in issue #12, I'm seeing some errors when I first start Vim:

2014-05-29 at 3 01 pm

Pressing ENTER clears the errors, and after that I see WordPress: Loading ... DONE.

As requested, here are the results of running wp cli cmd-dump (actually, since I'm using VVV, this is the result of running vassh wp cli cmd-dump): https://gist.githubusercontent.com/tnorthcutt/b95dc817fc09c35571cf/raw/34c8e2a6b3bf11d4826e84f586960f3f652aaa5f/wp%20cli%20cmd-dump

This is with version 0.1.8 of WordPress.vim and version 0.15.1 of WP-CLI.

dsawardekar commented 10 years ago

@tnorthcutt Good catch. Seems like there are some differences in how json is structured between different versions of WP-CLI.

dsawardekar commented 10 years ago

@tnorthcutt Can you verify the JSON you linked to is correctly pasted? I'm seeing some trailing characters after the final closing brace. Specifically the trailing, tle=\"Calendar characters.

Btw, I'm using this tool to check the json.

dsawardekar commented 10 years ago

@tnorthcutt I have made the WpCli json parser little more resilient to invalid json. This should get rid of your error. But the :Wfoo commands aren't likely to work until we figure out the reason for the invalid json.

Please update to 0.1.16 and confirm.

tnorthcutt commented 10 years ago

@dsawardekar You're right, I messed something up when pasting the json output. I inadvertently added the extra trailing characters. Here's the correct output:

https://gist.githubusercontent.com/tnorthcutt/b95dc817fc09c35571cf/raw/fe7bdc2398086dd065736dde388a6df6d85f8f79/wp%20cli%20cmd-dump

I'm not 100% sure of the correct way to update WP-CLI when it's running in VVV, actually. Do you know if I should just do a git pull of VVV and then run vagrant provision?

dsawardekar commented 10 years ago

@tnorthcutt I was referring to updating WordPress.vim to 0.1.16 or 0.1.17. :) I made some changes to make json parsing more robust that might fix the bug.

Not sure if git pull of VVV will bring in the latest WP-CLI. I tend to ssh into /srv/www/wp-cli and git pull origin master.

tnorthcutt commented 10 years ago

Ahh, that confused me, sorry.

I now don't see the error on startup, but I am seeing some bugginess related to the Generating CTAGS ... DONE message. I'll dig some more and report in the appropriate issue.