cognidox / WordBridge

https://www.cognidox.com/
6 stars 7 forks source link

Date issue + Comments question #27

Closed nickrap closed 12 years ago

nickrap commented 12 years ago

Firstly, thanks for this great component. Generally seems to work extremely well.

2 separate parts to my question:

  1. My blog abteamup.wordpress.com seems to be coming through to Joomla as expected (currently only in a dev site in the members area so can't point you to that unfortunately). The only unexpected thing is that although the creation dates of the blog items are fine on the summary page, they are all showing January 1, 1970 in the full articles. Any idea what's wrong?
  2. I have hidden the 'comments' link as per your advice in another post. However, I wondered if it is possible to somehow turn on JComments (installed in my Joomla installation) at the bottom of each full blog post? Alternatively, can WordPress comments be shown against each blog post and added to without being sent to Wordpress.com?

Thanks in advance. Nick

vittala commented 12 years ago

Hi Nick

  1. Can you let me know what version of Joomla you're running and whether you're running under Windows or Linux?
  2. We haven't looked at JComments, but a quick look at the joomlatune site seems to suggest it that it would be possible to create a plugin to use JComments. http://www.joomlatune.com/jcomments-developers-manual.html indicates a small plugin for JComments is required along with a template change in WordBridge.

At present, it's not possible to show the WordPress comments. WP does provide an API for displaying comments, so we are considering adding display support in a future release.

Regards Vittal

nickrap commented 12 years ago

Thanks for the incredibly fast response.

  1. I'm running under Windows. Is that a problem?
  2. I'm not amazingly technical - is the JComments thing something I would have any chance of doing myself?

Cheers, Nick

P.S. I'm going to write a glowing review on JED right now.

vittala commented 12 years ago

Hi Nick

We don't test extensively on Windows, but it should all work (we have users that use Windows). The invalid date format is somewhat odd, in that we format the date entry in the same way on both the listing view and expanded view. Clear the blog's cache by changing the menu item's cache timeout to zero in the Joomla admin and see if it helps.

You may be able to do the JComment work; you'll have to alter com_wordbridge/views/entry/view.html.php to create a comment ID (composed of the blog UUID and post ID). Then in the JComment plugin (jc_com_wordbridge), the three methods will need to split the id into post ID and blog UUID and look up the date in the table #__com_wordbridge_cache.

If I get a spare hour or so, I'll give it a shot, since it looks like a quick win for JComment support.

Regards Vittal

nickrap commented 12 years ago

Seems odd that it would be a Windows issue I agree. I've tried the above, cache to zero in the menu item + tried in IE (using Chrome by default) but same happening. Initially the dates showing on the summary page were also 1970 but that changed when I refreshed a few times and set the cache to zero. Seems like it is holding on to the 1970 date in the article - is this possible? I've just tried changing the date of an article in Wordpress - it came through as a change in the summary but still no change in the full article.

As for JComments - if you can have a go then that would be fantastic! I think I might struggle all day (and all weekend!). Can you let me know if you manage it?

Thanks again for all of your help - I've now posted on JED (comment in review).

Nick

vittala commented 12 years ago

Hi Nick

If you download the latest version from the GitHub tree (click "Download as zip" from https://github.com/cognidox/WordBridge/downloads), there will be JComments support. Simply install the latest component, and set the Jcomments enabled setting on you blog menu entry in Joomla.

As for the dates not appearing correctly, its possible its a windows php issue. The 1970 date would usually happen if the date stored in the database was blank or could not be parsed correctly. Can you check which PHP version you're using and look in your Joomla MySQL database, and see what the post_date values are in the ##_com_wordbridge_posts table (where ## is the table prefix of your joomla site).

Regards Vittal

nickrap commented 12 years ago

Wow! Superb! Thanks Vittal. I've installed the latest version and indeed it does provide the JComments integration. Only one minor issue - when you add a comment the comment does not appear until the screen is refreshed. Normally, it automatically shows the comment after you hit 'send' but for some reason it is keeping the comment hidden - any ideas why?

In terms of the 1970 issue - I'll check that out now and get back to you.

Nick

nickrap commented 12 years ago

Coming back re: 1970 date. PHP v5.3.13. In the db: post_date values in ##_com_wordbridge_posts table are the correct dates. Does this help?

nickrap commented 12 years ago

Issue re: 1970 dates resolved! For some reason the dates are now showing correctly throughout! I guess it must have been a cache issue somewhere... think that one can be closed - thanks!

vittala commented 12 years ago

Hi Nick

The latest code in GitHub does have a date formatting change, so its probably that change that's resolved the date issue.

As for the comments not automatically appearing, its up to JComment's javascript code to refresh the comments, not the calling component. Double check that you're not getting any browser errors when you submit comments - could be that you have an interaction from the various scripts on the page.

Regards Vittal

nickrap commented 12 years ago

Hi Vittal. Once again thank you for the time you've spent on the integration so far. I've been looking at the issue with the refresh of the comments and searching the forums about it. I was seeing no errors in Chrome's console so tried Firefox. This is the error I see when pressing 'Send' (with directory structure replaced by '...') under 'POST' entry in 'Response' tab of the console:

Warning: require_once(.../components/com_jcomments\helpers\helper.php) [function.require-once.php]: failed to open stream: No such file or directory in ...\components\com_jcomments\plugins\com_wordbridge.plugin.php on line 32

Fatal error: require_once() [function.require.php]: Failed opening required '.../components/com_jcomments\helpers\helper.php' (include_path='.;C:\PHP\v5.3\php') in ...\components\com_jcomments\plugins\com_wordbridge.plugin.php on line 32

I tried doing the same on a page that works okay and the response in Firefox console is completely different and is very long but ends with "......"jcomments.message('Thank you for your submission!', '');" }, { "n": "js", "d": "jcomments.clear('comment');" } ]"

I found something similar(ish) in a JoomlaTunes posting here if it helps (although could be a red herring!):

http://www.joomlatune.com/forum/index.php?topic=2924.0

Hope the above makes sense to you!

Nick

vittala commented 12 years ago

Hi Nick

Download the latest code from GitHub again and see if it helps.

Regards Vittal

nickrap commented 12 years ago

Brilliant - works perfectly! I hope other users also appreciate it.

Thank you once again, Nick

vittala commented 12 years ago

Thanks for the update Nick

Good to know its working for you.

Regards Vittal