cognidox / WordBridge

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

1062 - Duplicate entry #52

Open pwolver opened 10 years ago

pwolver commented 10 years ago

Hi there,

I just upgraded Joomla from 2.5 to 3.3 .. I didn't uninstall Wordbridge prior, and after the update realised it wasn't 3 compatible. I uninstalled my Wordbridge 2.5 version, used the 3 from Github. It installed fines far as I know, however when I try and look at my blog from my website i'm getting this error:

1062 - Duplicate entry '115-53c36ea4212f9-research' for key 'PRIMARY' SQL=INSERT INTO jml_com_wordbridge_post_categories VALUES (115, '53c36ea4212f9', 'research')

I'm assuming perhaps there's still some cached or saved bit of my blog remaining on my Joomla end that may need to be deleted somehow? I tried uninstalling the newer Wordbridge, then reinstalling it.. but still has this same error.

Any help would be appreciated. :)

Thanks,

Simon.

pwolver commented 10 years ago

Hi there,

I'm not sure if this helps, I dropped the cache timeout to 20 in the menu settings and the site loaded with the error:

Strict Standards: Non-static method WordbridgeHelper::fqdnBlogName() should not be called statically in /home2/simonalt/public_html/components/com_wordbridge/helpers/helper.php on line 55

On refreshing, it seems to have this one for a while, then the previous one for a while too.

Thanks again,

SImon.

lbourne43 commented 10 years ago

Hi pwolver

The Joomla 3 compatible version of WordBridge is still under development and is not yet totally stable. The error message:

Strict Standards: Non-static method WordbridgeHelper::fqdnBlogName() should not be called statically in /home2/simonalt/public_html/components/com_wordbridge/helpers/helper.php on line 55

is caused by a bug which I have now fixed. If you have filesystem access you can just replace /home2/simonalt/public_html/components/com_wordbridge/helpers/helper.php with https://raw.githubusercontent.com/cognidox/WordBridge/master/joomla_3.1/com_wordbridge/site/helpers/helper.php Unfortunately if you don't have filesystem access you will need to repackage and completing reinstall the WordBridge component to apply this fix.

As for your first error, I am not able to reproduce it myself. Could you let me know your blog's URL so that I can bridge from it locally for testing?

Lewis

pwolver commented 10 years ago

Hi Lewis,

No problems, i've updated the helper.php as you described. The first error seems to be the main one. My blogs url is: simonaltman.wordpress.com
and my website is www.simonaltman.com I've kept the word bridge button on the side if you need to see the error yourself?

Thanks again for all your help, its really appreciated.

lbourne43 commented 10 years ago

Hi Simon

Just to keep you updated, I've been doing some testing and found that the error you've seen is caused by a bug in WordBridge relating to caching posts in categories that have the same name as tags that are associated with the post for example posts in the 'Research' category which also have the 'research' tag.

I have a temporary fix which allows you to bridge as normal provided that you set your cache timeout to '0' under WordBridge's settings. I am working on a permanent solution but If you'd like I can package up and send you my temporary fix for you to use in the meantime. This would mean that you'd have to reinstall WordBridge again when the final fix is finished.

Lewis

pwolver commented 10 years ago

Sounds great, i'd definitely give a temporary fix a go till the full release is available. :)

lbourne43 commented 10 years ago

Hi Simon

I've done some more work on your problem and I've got a pre-release of the final fix for you which you are welcome to try. You can find it in the 'Lewis-cutting-edge' branch. Here's a link to the zip:

https://github.com/cognidox/WordBridge/archive/Lewis-cutting-edge.zip

I'm afraid you'll have to uninstall and reinstall the component completely this time as there have been more major changes than last time. When you uninstall you will get an error saying that WordBridge hasn't been uninstalled, at this point you will be able to reinstall. You can make your own package by creating a zip file and adding the WordBridge-Lewis-cutting-edge/joomla_3.1/com_wordbridge/ directory to it.

I've tried bridging from your blog on my test machine with this code and all seemed to work for me, however this release has not undergone enough testing to be considered stable yet so if you have any trouble or see anything that doesn't look right just let us know.

Lewis

pwolver commented 10 years ago

Hi there,

Thanks agin, I only just got around to zipping up and installing the plugin. It seems to work with no problems at all. Thank you so much for all your help with this, it is really appreciated.

Simon.