Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Slider stopped working on our site

Posted on 2014-01-16
7
Medium Priority
?
290 Views
Last Modified: 2014-02-22
Hi Experts,

We are launching a new site, and found on production server our slider has stopped working, and not rotating images on the home page...? Baffled...

Can you help us identify the error causing the slideshow not to work?

The link can be accessed on http://www.cityofndola.gov.zm
0
Comment
Question by:kasondeneddy
  • 5
  • 2
7 Comments
 
LVL 1

Expert Comment

by:Smart_Kid
ID: 39784962
looks like this file
...postmessagerelay.js

Open in new window

is missing in your deployed server/ your war/ear file.

Check if the file is available in your war/ear file thats is deployed.


Also see if all the .js files are there
0
 

Author Comment

by:kasondeneddy
ID: 39785119
Thanks for the response, checked files and everything is there...

Just disabled a plugin and it worked... :-) Guess a plugin issue caused it, conflict in js
0
 
LVL 1

Expert Comment

by:Smart_Kid
ID: 39785143
Good to hear that.

If you debug your browser, you could see the errors.
In Chrome / Firefox browser, Press F12 to open the developer tool and goto the Console tab to see errors.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:kasondeneddy
ID: 39785176
Noted..with thanks..its a plugin, but actually need to use the plugin...looking at support seeing js conflict somewhere in it, can you help me resolve?
0
 

Author Comment

by:kasondeneddy
ID: 39785188
I can see...

require_once('../../../wp-load.php');

inside the plugin, that is wrong..but dont know whether to delete it, or how to work around it.
0
 

Accepted Solution

by:
kasondeneddy earned 0 total points
ID: 39785256
Hi Guys,

FAQ plugin causing the issue... has the following code, which I believe wp_load is causing issues:

<?php 
	require_once('../../../wp-load.php');
	require_once('../../../wp-admin/includes/admin.php');
	do_action('admin_init');
 
	if ( ! is_user_logged_in() )
		die('You must be logged in to access this script.');
 
	if(!isset($indianic_faq))
		$indianic_faq = new iNIC_faq();
    
    $_group_list_options = false;
    $_group_list = $indianic_faq->wpdb->get_results("SELECT g.*, COUNT(q.id) AS question FROM {$indianic_faq->wpdb->prefix}inic_faq_group g LEFT JOIN {$indianic_faq->wpdb->prefix}inic_faq_question q ON (g.id = q.group_id) GROUP BY g.id");
    if($_group_list) {
      foreach($_group_list as $_group_list) {
        $_group_list->status = $_group_list->status ? "Active" : "Inactive";
        $_group_list_options .= "<option value=\"{$_group_list->id}\">{$_group_list->group_name} ( {$_group_list->status} ) ( {$_group_list->question} Questions )</option>";
      }
    }
    global $indianic_faq;
?>
(function(){
	tinymce.create('tinymce.plugins.inicfaqs', {
		createControl : function(id, controlManager) {
			if (id == 'iNICfaqs_button') {
				var button = controlManager.createButton('iNICfaqs_button', {
					title : 'Faqs Shortcode', // title of the button
					image : '<?php echo $indianic_faq->pluginUrl; ?>icon_shortcode.png',  // path to the button's image
					onclick : function() {
						var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
						W = W - 80;
						H = H - 84;
						tb_show( 'IndiaNIC FAQs Shortcode', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=inicfaqs-form' );
					}
				});
				return button;
			}
			return null;
		}
	});

	tinymce.PluginManager.add('inicfaqs', tinymce.plugins.inicfaqs);
	
	jQuery(function(){
		var form = jQuery('<div id="inicfaqs-form"><table id="inicfaqs-table" class="form-table">\
			<tr>\
				<th><label for="faqs_group">FAQs Group</label></th>\
				<td><select name="faqs_group" name="faqs_group"><?php echo $_group_list_options; ?></select><br /></td>\
			</tr>\
			<tr>\
				<th><label for="faqs_search_box">Show Search Box</label></th>\
                <td><select name="faqs_search_box"><option value="default">As per Group</option><option value="1">Yes</option><option value="0">No</option></select><br />\
				<small>place a search box above the group questions on the front-end</small>\
			</tr>\
			<tr>\
				<th><label for="faqs_ask_box">Show Ask Box</label></th>\
                <td><select name="faqs_ask_box"><option value="default">As per Group</option><option value="1">Yes</option><option value="0">No</option></select><br />\
				<small>place a submission box below the group questions for users to ask question</small>\
			</tr>\
		</table>\
		<p class="submit">\
			<a href="javascript:void(0)" id="inicfaqs-shortcode-submit" class="button-secondary"><strong>Insert FAQs Shortcode</strong></a>\
		</p>\
		</div>');
		
		var table = form.find('table');
		form.appendTo('body').hide();
        
		form.find('#inicfaqs-shortcode-submit').click(function(e){
			
			var shortcode = '[iNICfaq';
            shortcode += ' id='+table.find('select[name=faqs_group] option:selected').attr('value');
            
            var search_box_val = table.find('select[name=faqs_search_box] option:selected').attr('value');
            if(search_box_val != 'default') {
              shortcode += ' searchbox='+search_box_val;
            }
            
            var ask_box_val = table.find('select[name=faqs_ask_box] option:selected').attr('value');
            if(ask_box_val != 'default') {
              shortcode += ' askbox='+ask_box_val;
            }
			
			shortcode += ']';
            
			tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
			tb_remove();
		});
	});
})()

Open in new window

0
 

Author Closing Comment

by:kasondeneddy
ID: 39878988
Found the problem myself...seems like EE helps to think creatively by posting on community
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question