Recent Topics

[2.4.1] [Solved] Troubles with JavaScript plugins

Started by on Apr 06, 2008 – Contents updated: Apr 06, 2008

Apr 06, 2008 16:45    

I'm fairly new to B2EVO and to blogging CMS systems in general so bear in mind that I may not have a clue about things that might be obvious. :-/

I have the Smilies plugin installed in the backoffice and it is checked in the Text Renderers section when I write a new post in the backoffice. I'm using the Chicago skin for the backoffice and I don't see any plugin tools where I write a new post. I have the Video Plug plugin and the toolbar includes buttons to add to YouTube Google Video, LiveVideo, etc... but I don't know if that's the Video Plug or if it's a built-in piece of code.

More importantly, Smilies aren't being rendered in my blog. I also don't see any of these plugin tools available to commenters (such as the smilies icons toolbar). Am I missing a piece of the installation/implementation process to make use of these?

I'm using a custom-made skin2.0 so bear in mind that this might be part of the problem.

Thanks,
Jeff

*edit*
Changed the title
Afwas

Apr 06, 2008 17:06

Hi epoclaen,

Let's first do the obvious tricks.
1) uninstall the smilies plugin in Global settings -> Plugins install
2) install the plugin again
3) Hit the 'reload plugins' link
4) Wander to Tools -> Misc and hit the 'Delete prerendered item cache' link.

This makes sure everything is refreshed.
If the problem persists you may want to FTP the smilies plugin files again in between steps 1) and 2). If you still have problems, check the blog in another browser and make sure JavaScript is set up correctly in the browser.

Here are some leads you want to chack. Do report back any (odd) bahviour.

Good luck

Apr 06, 2008 17:43

I forgot to give the website link: http://www.amaranthsgardens.com.

I had already gathered that a reinstall might do the trick but I tried it again anyway with the extra steps of reloading the plugins, re-uploading the original plugin via FTP and deleting the item cache but I still don't see them being rendered. I also tested it in IE and made sure FireFox's NoScript plugin was allowing scripts globally all to no effect.

I tried a search for "smil" to see if any related code snippets that are included in any of the default skins have sections that needed to be included in the customized skin but failed to see any hints in the files found from the search results.

Hopefully you have more tips?

Thanks again,
Jeff

Apr 06, 2008 17:57

You did set the Render comments setting in the settings for the Smilies plugin, did ya?

Apr 06, 2008 18:02

You did set the Render comments setting in the settings for the Smilies plugin, did ya?

Confirmed. I also made sure the Use Smilies Toolbar was checked in both the admin and default user profiles.

Apr 06, 2008 18:23

A few other notes that might help - My web server originally installed version 1.6.? but I'm 99.9% sure that I completely deleted that before installing the v2.4.1 upgrade.

I see that the source code of this (mode=reply) page includes HTML for a table of the smiley icons and links. My comments page does not so it's not that it isn't being rendered, it's that it isn't being included. There isn't some code other than what's in the default code found in _item_comment_form.inc.php is there?

Apr 06, 2008 18:30

Okay, some new data...

I have the Enable Smileys checkbox selected in the backend form of the User Profiles but this option isn't even shown if I choose the Edit Profile link on the website. Does that give us any clues?

Apr 06, 2008 19:09

The "disp=profile" is lacking in lots of ways .... we're working on it ;)

¥

Apr 06, 2008 19:18

The smilies toolbar is rendered through javaScript. I don't think it's your browser that's badly set up. I can check your settings if you PM me login name & password.

Good luck

Apr 06, 2008 20:52

I've seen the digg thing twice but it's not there anymore.
I had a play with the plugins without any result.
All javascript is there and looks ok. It just doesn't work.

For the moment I'm out of clues. I'll keep looking though.

Apr 06, 2008 21:21

I'm going to turn debugging on for a moment to see if it helps any. It won't be on for long.

Apr 06, 2008 21:49

Apr 06, 2008 21:55

Aha! Take a look at debug mode's Plugins section:


plugins:
    * Loading plugin events.
    * Trigger event SessionLoaded
    * No registered plugins.
    * Trigger event CachePageContent (first true)
    * No registered plugins.
    * Trigger event AlternateAuthentication (first true)
    * No registered plugins.
    * Trigger event AfterLoginAnonymousUser
    * No registered plugins.
    * Trigger event BeforeBlogDisplay
    * No registered plugins.
    * Trigger event GetProvidedSkins (first return)
    * No registered plugins.
    * Trigger event SkinBeginHtmlHead
    * Registered plugin IDs: 6, 14
    * get_by_ID(): Instantiate Plugin (ID 6).
    * Loading plugins table data.
    * register(): code_highlight_plugin, ID: 6, priority: 80, classfile_path: [/home/epoclaen/public_html/blog/plugins/code_highlight_plugin/_code_highlight.plugin.php]
    * Loading plugin class file: code_highlight_plugin
    * Calling code_highlight_plugin(#6)->SkinBeginHtmlHead( )
    * get_by_ID(): Instantiate Plugin (ID 14).
    * register(): collapsable_categories_plugin, ID: 14, priority: 90, classfile_path: [/home/epoclaen/public_html/blog/plugins/collapsable_categories_plugin/_collapsable_categories.plugin.php]
    * Loading plugin class file: collapsable_categories_plugin
    * Calling collapsable_categories_plugin(#14)->SkinBeginHtmlHead( )
    * Trigger event ItemViewsIncreased
    * No registered plugins.
    * Loading plugin events.
    * Loading plugins table data.
    * get_by_ID(): Instantiate Plugin (ID 20).
    * register(): smilies_plugin, ID: 20, priority: 15, classfile_path: [/home/epoclaen/public_html/blog/plugins/_smilies.plugin.php]
    * Loading plugin class file: smilies_plugin
    * get_by_ID(): Instantiate Plugin (ID 3).
    * register(): autolinks_plugin, ID: 3, priority: 60, classfile_path: [/home/epoclaen/public_html/blog/plugins/_autolinks.plugin.php]
    * Loading plugin class file: autolinks_plugin
    * get_by_ID(): Instantiate Plugin (ID 7).
    * register(): videoplug_plugin, ID: 7, priority: 65, classfile_path: [/home/epoclaen/public_html/blog/plugins/videoplug_plugin/_videoplug.plugin.php]
    * Loading plugin class file: videoplug_plugin
    * get_by_ID(): Instantiate Plugin (ID 2).
    * register(): auto_p_plugin, ID: 2, priority: 70, classfile_path: [/home/epoclaen/public_html/blog/plugins/_auto_p.plugin.php]
    * Loading plugin class file: auto_p_plugin
    * get_by_ID(): Instantiate Plugin (ID 6).
    * register(): code_highlight_plugin, ID: 6, priority: 80, classfile_path: [/home/epoclaen/public_html/blog/plugins/code_highlight_plugin/_code_highlight.plugin.php]
    * get_by_ID(): Instantiate Plugin (ID 4).
    * register(): texturize_plugin, ID: 4, priority: 90, classfile_path: [/home/epoclaen/public_html/blog/plugins/_texturize.plugin.php]
    * Loading plugin class file: texturize_plugin
    * Trigger event SkinEndHtmlBody
    * No registered plugins.
    * Trigger event AppendHitLog (first true)
    * No registered plugins.

The "/home/epoclaen/public_html/" part is the root FTP upload location of the files on the web hosting site, but not the http location. Any idea if this is the issue and where I can change this? It actually looks like it's being set up properly in /conf/_advanced.php and the plugins appear to be being found so maybe this url is the way it should be.

This is being called from my custom _html_header.inc.php file in the

<?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>


line.

Apr 06, 2008 22:03

Good catch Afwas! Those files are certainly missing although I can't imagine why. I re-downloaded the latest version of b2evolution and those files are there and maybe other more crucial files need updating or weren't updated properly too but now I'm stuck reinstalling the b2evolution system? I hate to have to do that but maybe it's the only answer.

Apr 06, 2008 22:11

The skinBeginHtmlHead thing works fine. I know because one of the plugin is the Collapsable Categories. What is does is inject some lines of code in the <head> section. In the case of that plugin it's a call to the javascript file. As you can see on your blog, that works fine.

If I click on the links for the images in my previous post I get a 403 error (permission denied). Have a look at the perms for the /blog/rsc/ folder. It may be the images are there, but the permissions are set wrong. Do you have a protection clause in your .htaccess? Any measures you took to prevent others to get at your pictures?

As for the path: the blog and related files should be in /home/epoclaen/public_html/blog/ In /blog/config/_basic_config.php check the $baseurl, but if that was set wrong other things would not function (in fact nothing would).

Good luck

Apr 06, 2008 22:13

epoclaen wrote:

Good catch Afwas! Those files are certainly missing although I can't imagine why. I re-downloaded the latest version of b2evolution and those files are there and maybe other more crucial files need updating or weren't updated properly too but now I'm stuck reinstalling the b2evolution system? I hate to have to do that but maybe it's the only answer.

No need to re-install, make sure (all) the files are on the server.

Apr 06, 2008 22:39

You have some funny PHP settings regarding ownership and permissions. have a look at Tools -> System where it shows this error:

PHP
PHP running as USER:
xxxxxx (uid 33911) 

Warning: posix_getegid() has been disabled for security reasons in /home/epoclaen/public_html/blog/inc/tools/system.ctrl.php on line 287

Apr 06, 2008 23:18

You have some funny PHP settings regarding ownership and permissions.

Interesting. Is the group ID set by the server? This is on a free PHP hosting site at the moment and they do have some limits on certain PHP commands. I'm not sure why they'd deny using posix_getegid() though.

The good news is that uploading any missing files in the rsc directory did the trick! I cleared the pre-rendered items cache and it even rendered smileys in my previous posts. I just wish I knew why I was missing so many files. I'll have to review each and every other folder now too just to be sure.

I do have special .htaccess permissions and a special one for the /files/ directory to allow users to browse the directory manually but I guess they weren't the issue.

Now I just need to get the Social Bookmarks plugin working. Likely it's another issue with missing icons again but we'll see.

Thanks so much for the help Afwas!!! You saved me tons of potential hairloss.

Jeff :D

Apr 06, 2008 23:22

Hi Jeff,

Great job. Glad you sorted it out in the end.

Happy blogging

(the social bookmark plugin may be outdated. I don't know if there is a 2.0 version of it).

Apr 07, 2008 02:28

The bookmark plugin just needed its paths to the bookmark icons changed to reflect where I have the blog installed.


Form is loading...

Community software – This forum is powered by b2evolution CMS, a complete engine for your website.