IFBook / commentpress-core

CommentPress Core is a WordPress plugin for creating and debating social texts in social contexts. It replaces all previous plugins (standalone and multisite) and includes the default theme. Compatible with WordPress Standalone and Multisite, BuddyPress and Groupblogs.
https://www.futureofthebook.org/commentpress
GNU General Public License v2.0
40 stars 10 forks source link

AJAX error #63

Closed canferman closed 8 years ago

canferman commented 8 years ago

when someone comment on a paragrapf, a dialog box from chorme and firefox says: AJAX error! TypeError: Cannot read property 'header' of undefined

when i deleted the 1322. line of jquery.commentpress.js

offset: CommentPress.theme.header.get_offset()

the dialog box doesnt appears

christianwach commented 8 years ago

Which theme are you using?

canferman commented 8 years ago

commentpress modern

christianwach commented 8 years ago

ok... and which version of CommentPress?

canferman commented 8 years ago

3.8.4

and also,

when i looking with "inspect element" if i click on a paragraph, inspect element console says:

Uncaught TypeError: Cannot read property 'viewport' of undefined
(anonymous function)    @   jquery.commentpress.min.js?ver=3.8.4:859
n.event.dispatch    @   jquery.js?ver=1.11.3:3
r.handle    @   jquery.js?ver=1.11.3:3

after i deleted the 859. line of jquery.commentpress.js, thiss error dissapears

christianwach commented 8 years ago

Hmm, well I'm not sure deleting bits of Javascript is going to solve the issue ;-) Do you have a URL I can look at?

canferman commented 8 years ago

i know that, but i m not a master of js =)

benceboyle.net

you can login with this info, and try to comment to some paragraph of random post.

i will delete this account after some minutes =)

christianwach commented 8 years ago

I'm in and have changed the pwd. Can you add define('SCRIPT_DEBUG', true); to your wp-config.php please?

canferman commented 8 years ago

ok i changed it true

christianwach commented 8 years ago

You have an old version of the theme in the 'wp-content/themes'. The plugin supplies its own theme inside the plugin's own directory. You shouldn't duplicate it in 'wp-content/themes'. If you want to restyle things, I recommend that you create a child theme.

canferman commented 8 years ago

ok, thanks a lot, i deleted the theme in commentpress plugin folder because of some other errors. i dont kown how can edit a child theme but i will try... i will update my theme folder, i changed only the css files

thank you so much

christianwach commented 8 years ago

HTH :-)

canferman commented 8 years ago

its looks like my used theme commentpress-modern is the latest version of theme: https://plugins.svn.wordpress.org/commentpress-core/tags/3.8.4/themes/commentpress-modern/style.css version 3.5

i will transfer my theme files to ../plugin/comment-press/themes

edit: i tranfered all the theme file to ../plugin/comment-press/themes, but nothing changed

christianwach commented 8 years ago

@canferman I would put your theme to one side for the moment. It may look like a current version but it isn't. Save it somewhere outside your WordPress install. Now re-install CommentPress Core from the WordPress repo by downloading and overwriting the plugin's folder.

Next, grab a copy of this sample child theme that you can build upon. Unzip and put the resulting (renamed as per the instructions) folder in 'wp-content/themes'. Activate it and start overriding the look and feel of the CommentPress Modern Theme by transferring your amends to the 'style-overrides.css' file. You can also dequeue a couple of other CommentPress stylesheets by uncommenting a couple of lines in the child theme's functions.php file if they're not needed.