gust icon indicating copy to clipboard operation
gust copied to clipboard

0 Words and not able to post?

Open itawde opened this issue 11 years ago • 11 comments

After installing Gust 0.3.1 on my web server (Debian, Nginx, PHP 5.4) the editor does load, but when I add want to add a new post the preview window always shows "0 words" and when clicking on "Update Post" nothing is happening.

When loading the editor with Firebug open however there's a JS error:


TypeError: jQuery(...).upload is not a function jQuery('.js-drop-zone').upload({editor: true});

in gust.js?v=0.0.1 (Line 631)

Not sure if that already might be the reason for it. Anyhow right now I'm not able to use the editor at all which is kind of a shame.

Any hints are appreciated :)

itawde avatar Jan 04 '14 10:01 itawde

Hi @itawde , thanks for reporting!

the error you are showing indicates one of javascript libraries is not loaded.

Could you confirm if yourdomain.com/wp-content/plugins/wp-ghost/assets/jquery-fileupload.js?v=0.3.3 loads correctly?

Also, just on a hunch - does adding an error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); at the beginning of gust.php (around line 10) help with the problem?

ideag avatar Jan 04 '14 14:01 ideag

Hi,

jquery-fileupload seems to be loading. At least it shows up within the generated source code :)

Adding the error_reporting to gust.php didn't change anything. Behaviour stays the same, also no additional (error) output.

itawde avatar Jan 04 '14 15:01 itawde

Hi again,

Is the output of http://yourdomain.com/wp-content/plugins/gust/assets/jquery-fileupload.js?v=0.3.3 the same as http://ghost.wordofpress.com/assets/ghost/plugins/gust/assets/jquery-fileupload.js?v=0.3.3 if you open the links in browser?

Also, is this on live server or in localhost?

ideag avatar Jan 04 '14 15:01 ideag

Hm if there's any tool available for a quick 1:1 source code comparison then I don't have it ;)

If you want to check 1542 lines manually, here's the output from my server: https://gist.github.com/itawde/8256749 ;)

It's a live server.

itawde avatar Jan 04 '14 15:01 itawde

@itawde the tool is called diff (e.g. http://www.diffchecker.com/). The output matches, so I'll have to look for another problem.

Now if you tried changing line 542 of gust.js to jQuery('#add-post-list').attr('href',Gust.ghost_base+'/editor/'+type); Any chages?

ideag avatar Jan 04 '14 17:01 ideag

Ah thanks for the link :)

General behavior didn't change. However now the JS error doesn't show up on load of the editor, but it does when clicking on the arrow right next to "Update post". Klicking on "Update post" itself still nothing happens, and still the editor does show "0 Words".

itawde avatar Jan 04 '14 17:01 itawde

is the actual error message the same? Have you tested this on several browsers? I assume you use Firefox as you mentioned Firebug.

ideag avatar Jan 04 '14 21:01 ideag

Yes, same error message. Tested on Firefox, Chrome and Safari on my Mac. Behavior identical on all browsers here.

itawde avatar Jan 04 '14 21:01 itawde

Hi, @itawde,

I have just released a 0.3.2 version, with several small updates and fixes. I wonder if this helped in anyway with your issue?

ideag avatar Jan 06 '14 07:01 ideag

Unfortunately not.

itawde avatar Jan 07 '14 13:01 itawde

I'll keep looking, then.

ideag avatar Jan 07 '14 13:01 ideag