Adding data to debug.log file of CakePHP 2 - php

In my CakePHP 2.2 application I get a "notice" inside my debug.log file. I get this warning nearly every day but I couldn't solve the problem. So I need to write some additional data inside debug.log. But I want to write that data when this "notice" occurs.
For example I get this notice:
2012-09-26 19:53:01 Notice: Notice (8):
Trying to get property of non-object in
[/var/www/vhosts/example.com/app/View/Tools/index.ctp, line 42]
Trace:
include - APP/View/Tools/index.ctp, line 42
View::_evaluate() - CORE/Cake/View/View.php, line 920
View::_render() - CORE/Cake/View/View.php, line 883
View::render() - CORE/Cake/View/View.php, line 475
Controller::render() - CORE/Cake/Controller/Controller.php, line 957
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 161
[main] - APP/webroot/index.php, line 96
I want to add all session variables into debug.log file when this notice occurs.
How can I do this?
Can I change lib/Cake/Log/Cakelog.php
What should I write and where?
Edit: I paste the related code snippet:
39 <?php if ($auth) { ?>
40 <form class="well" >
41
42 <?php if (isset($user->profile_url)) {
43 echo '<img src="'.$user->profile_url.'" width="48" height="48"/>';
44 } ?>
45
46 <strong><?php echo $user->screen_name; if (isset($user->name)) { echo " (" . $user->name . ")"; } ?></strong><br/>
47 <small><?php if (isset($user->description)) { echo $user->description; } ?> </small><br/>
48 <small><?php if (isset($user->url)) { echo $user->url; } ?> </small><br/>
49 <br/>

Related

Undefinid variables in template - Cake PHP 2.x

I just migrate a cakephp 2.5 app to a server with PHP 7.2 (before server has 5.6 to 7.1), so I should update core (2.10) and finally get to show the app correctley but I'm having issues when urls with parameters loads.
The error is when I try to load a view passing a parameter in URL the controller are not passing the data correctly to the template and get errors like Undefined variable: menu [APP/View/Layouts/default.ctp, line 97, for all variables.
include - APP/View/Layouts/default.ctp, line 97
View::_evaluate() - CORE/Cake/View/View.php, line 971
View::_render() - CORE/Cake/View/View.php, line 933
View::renderLayout() - CORE/Cake/View/View.php, line 546
View::render() - CORE/Cake/View/View.php, line 481
Controller::render() - CORE/Cake/Controller/Controller.php, line 968
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 200
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 109
I would aprreciate your opinions. Thanks.
For example I call view localhost.com/administrator/Banners/editarBigHomePage?id=351 and the template is full with Notices of undefinied variables, this just happens with URLS with parameters included.
Here is the view with variables:
public function editarBigHomePage()
{
$this->verificarUsuario();
if(!empty($this->request->params["url"]['id'])){
$id = $this->request->params["url"]['id'];
$categorias = $this->Categoria->find('all');
$this->set('categorias',$categorias);
$ciudades = $this->Ciudade->find('all');
$this->set('ciudades',$ciudades);
$publicidad = $this->Publicidade->findById($id);
$this->set('publicidad',$publicidad);
$this->set('menu','publicity');
$this->set('menu2','pase el menu por aqui');
}
if(!empty($this->request->data)){
$dataPublicidad= $this->request->data["Publicidade"];
$dataPublicidad["inhome"]=1;
if($this->Publicidade->save($dataPublicidad)){
$this->Session->setFlash('Publicity Edited','success');
return $this->redirect(array('controller'=>'Banners','action'=>'listarBigHomePage'),null,true);
}else{
$this->Session->setFlash('Error Publicity No Edited');
return $this->redirect(array('controller'=>'Banners','action'=>'listarBigHomePage'),null,true);
}
}
}

PHP RSS FEED - Reading different feed types

I'm not sure that the title of my question is correct, but I'm trying to read some RSS Feeds (Podcasts feeds) and with the same PHP code, some rss feeds cannot be parsed, and others are parsed. I don't know why and I don't know how to track to find the error.
I'm using simplexml_load_file - code below:
<?php
//$xml = simplexml_load_file("http://hipsters.tech/feed/podcast/"); # it works
$xml = simplexml_load_file("https://jovemnerd.com.br/feed-nerdcast/"); # it doesn't works
# <channel> data
echo $xml->channel->title . "<br>\n";
echo $xml->channel->link . "<br>\n";
echo $xml->channel->language . "<br>\n";
echo $xml->channel->description . "<br>\n";
echo $xml->channel->image->url . "<br>\n";
$otherNode = $xml->channel->children('http://www.itunes.com/dtds/podcast-1.0.dtd');
echo $otherNode->author . "<br>\n";
echo "<br>#########################<br><br>\n";
# <item> data
for ($i = 0; $i < count($xml->channel->item); $i++ ) {
echo $xml->channel->item[$i]->title . "<br>\n";
echo $xml->channel->item[$i]->link . "<br>\n";
echo $xml->channel->item[$i]->pubDate . "<br>\n";
echo $xml->channel->item[$i]->description . "<br>\n";
echo "<br>#########################<br><br>\n";
}
?>
Inside my code, you can see that there are 2 links, the commented one is the link that works, the other doesn't works.
I've seen other posts on stack and other sites/forums, but I really don't know how to parse any RSS feed with one code, without headaches.
Please, I need some help. Thank you.
EDIT
Error:
Warning: simplexml_load_file(https://jovemnerd.com.br/feed-nerdcast/): failed to open stream: Connection timed out in /var/www/html/thundercast-api/FeedReader.php on line 7
Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://jovemnerd.com.br/feed-nerdcast/" in /var/www/html/thundercast-api/FeedReader.php on line 7
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 10
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 10
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 11
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 11
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 12
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 12
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 13
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 13
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 14
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 14
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 14
#########################
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 21
Notice: Trying to get property of non-object in /var/www/html/thundercast-api/FeedReader.php on line 21

Use of undefined constant sql - assumed 'sql'

I'm new to PHP and just doing a test site for practice. I've run across the following error:
Notice: Use of undefined constant sql - assumed 'sql' in F:\wamp\www\css\Index.php on line 33
Call Stack
# Time Memory Function Location
1 0.0003 671872 {main}( ) ..\Index.php:0
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in F:\wamp\www\css\Index.php on line 35
Call Stack
# Time Memory Function Location
1 0.0003 671872 {main}( ) ..\Index.php:0
2 1.0141 680104 mysql_fetch_array ( ) ..\Index.php:35
Here's a snip of the portion that it finds erroneous:
30 <?php
31
32 $sql="SELECT * FROM products ORDER BY name ASC";
33 $query=mysql_query(sql);
34
35 while ($row=mysql_fetch_array($query)) {
36
37 ?>
38 <tr>
39 <td><?php echo $row['SKU'] ?></td>
40 <td><?php echo $row['Product'] ?></td>
41 <td>Select Product</td>
42 </tr>
43 <?php
44 }
45 ?>
I've included the line numbers with the snip. The table that I'm trying to pull from is indeed "products," so I don't think that's the issue here. I've been scratching my head for the past hour or so trying to figure out where the issue is, but I can't figure it out. I guess I should take that as a warm welcome from Father PHP as an initiation rite of passage, huh?
Variables must begin with $
This is wrong-
$query=mysql_query(sql);
^^^ This must be $sql
This should work -
$query=mysql_query($sql);
^Added $
You forgot the $ on line 33:
$query=mysql_query(sql); // Note that you have here "sql", not "$sql".
Instead, you should use:
$query=mysql_query($sql);

Unable to access CakePHP email view variables

I'm trying to set variables for an HTML email template, but I can't seem to be able to access the variables. When I echo the variable name in the template, in the sent email it shows an error saying "undefined variable". In the error description, it even shows the variables that were set.
App::uses('CakeEmail', 'Network/Email');
$Email = new CakeEmail();
$Email->from(array('info#example.com' => 'Test'));
$Email->to('myemail#email.com');
$Email->subject('Test email variables');
$Email->template('layout_1');
$Email->emailFormat('html');
$Email->viewVars(array('input_1','test input 1'));
$Email->send();
The following error shows up in the email and I can actually see the "input 1" variable that I set.
NOTICE (8): UNDEFINED VARIABLE: INPUT_1 [APP/VIEW/EMAILS/HTML/LAYOUT_1.CTP, LINE 44]
CODE CONTEXT
<TR>
<TD CLASS="HEADER-BAR" VALIGN="TOP" STYLE="COLOR: #999; FONT-FAMILY: VERDANA; FONT-SIZE: 10PX; TEXT-TRANSFORM: UPPERCASE; PADDING: 0 20PX; HEIGHT: 15PX;" WIDTH="400"
HEIGHT="15">
<?PHP PRINT_R($INPUT_1); ?>
$VIEWFILE = '/APPLICATIONS/XAMPP/XAMPPFILES/HTDOCS/APP/VIEW/EMAILS/HTML/LAYOUT_1.CTP'
$DATAFORVIEW = ARRAY(
'CONTENT' => '',
(INT) 0 => 'INPUT_1',
(INT) 1 => 'TEST INPUT 1'
)
$CONTENT = ''
INCLUDE - APP/VIEW/EMAILS/HTML/LAYOUT_1.CTP, LINE 44
VIEW::_EVALUATE() - CORE/CAKE/VIEW/VIEW.PHP, LINE 945
VIEW::_RENDER() - CORE/CAKE/VIEW/VIEW.PHP, LINE 907
VIEW::RENDER() - CORE/CAKE/VIEW/VIEW.PHP, LINE 471
CAKEEMAIL::_RENDERTEMPLATES() - CORE/CAKE/NETWORK/EMAIL/CAKEEMAIL.PHP, LINE 1582
CAKEEMAIL::_RENDER() - CORE/CAKE/NETWORK/EMAIL/CAKEEMAIL.PHP, LINE 1448
CAKEEMAIL::SEND() - CORE/CAKE/NETWORK/EMAIL/
CAKEEMAIL.PHP, LINE 1073
TEMPLATESCONTROLLER::SEND_NEWSLETTER() - APP/CONTROLLER/TEMPLATESCONTROLLER.PHP, LINE 110
TEMPLATESCONTROLLER::EDIT() - APP/CONTROLLER/TEMPLATESCONTROLLER.PHP, LINE 194
REFLECTIONMETHOD::INVOKEARGS() - [INTERNAL], LINE ??
CONTROLLER::INVOKEACTION() - CORE/CAKE/CONTROLLER/CONTROLLER.PHP, LINE 486
DISPATCHER::_INVOKE() - CORE/CAKE/ROUTING/DISPATCHER.PHP, LINE 187
DISPATCHER::DISPATCH() - CORE/CAKE/ROUTING/DISPATCHER.PHP, LINE 162
[MAIN] - APP/WEBROOT/INDEX.PHP, LINE 111
I also tried to print that $dataforview variable that shows, but I get the same error.
I haven't used cake in ages, but quickly looking at their docs they are expecting a key => value array passed to viewVars() method.
I assume you meant to do:
$Email->viewVars(array('input_1' => 'test input 1'));
Secondly, it looks like are you are defining the value as "input_1", but trying to access it as "INPUT_1". In PHP, variables are case sensitive.

How to change this complex function to a simple redirect

I have been making some changes to a wordpress ecommerce plugin and I've taken out a ton of functions to make it simpler for my needs. Now it won't redirect to the thankyou page after the purchase button is pressed because the function uses some variables that I got rid of like order_id, etc.
I've been working on this for a few hours now, and all I want it to do is redirect to thankyou.php on the click of the purchase button. (I know right now it uses ajax, and I wouldn't mind using it too) I don't need it to go to the processpayment function or anything like that. Really simple.
Here is the code and the functions that I'm working with:
Thanks so much!!!
Input element:
<div id="payment">
<div class="form-row">
<noscript><?php _e('Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'jigoshop'); ?><br/><input type="submit" class="button-alt" name="update_totals" value="<?php _e('Update totals', 'jigoshop'); ?>" /></noscript>
<?php jigoshop::nonce_field('process_checkout')?>
<input type="submit" class="button-alt" name="place_order" id="place_order" value="<?php _e('Next Step', 'jigoshop'); ?>" />
<?php do_action( 'jigoshop_review_order_before_submit' ); ?>
<?php if (get_option('jigoshop_terms_page_id')>0) : ?>
<p class="form-row terms">
<label for="terms" class="checkbox"><?php _e('I accept the', 'jigoshop'); ?> <?php _e('terms & conditions', 'jigoshop'); ?></label>
<input type="checkbox" class="input-checkbox" name="terms" <?php if (isset($_POST['terms'])) echo 'checked="checked"'; ?> id="terms" />
</p>
<?php endif; ?>
<?php do_action( 'jigoshop_review_order_after_submit' ); ?>
</div>
</div>
checkout.class.php:
// Process Payment
$result = $available_gateways["cheque"]->process_payment( $order_id );
// Redirect to success/confirmation/payment page
if (is_ajax()) :
ob_clean();
echo json_encode($result);
exit;
else :
wp_safe_redirect( $result['redirect'] );
exit;
endif;
else :
// No payment was required for order
$order->payment_complete();
// Empty the Cart
jigoshop_cart::empty_cart();
// Redirect to success/confirmation/payment page
$checkout_redirect = apply_filters( 'jigoshop_get_checkout_redirect_page_id', get_option( 'jigoshop_thanks_page_id' ) );
if (is_ajax()) :
ob_clean();
echo json_encode( array( 'redirect' => get_permalink( $checkout_redirect ) ) );
exit;
else :
wp_safe_redirect( get_permalink( $checkout_redirect ) );
exit;
endif;
endif;
// Break out of loop
break;
process payment function:
function process_payment() {
// Remove cart
jigoshop_cart::empty_cart();
// Return thankyou redirect
$checkout_redirect = apply_filters( 'jigoshop_get_checkout_redirect_page_id', get_option( 'jigoshop_thanks_page_id' ) );
return array(
'result' => 'success',
'redirect' => add_query_arg('key', $order->order_key, add_query_arg('order', $order_id, get_permalink( $checkout_redirect )))
);
}
Here is the error details I'm getting from firebug:
After I turned debugging on, I got these errors:
Notice: Undefined index: aiosp_enabled in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php
on line 710
Notice: Undefined index: aiosp_enabled in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php
on line 710
Notice: Use of undefined constant PLUGIN_URL - assumed 'PLUGIN_URL' in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/wp-google-fonts/google-fonts.php
on line 81
Notice: Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH'
in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/wp-google-fonts/google-fonts.php
on line 82
Notice: Undefined index: host in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jetpack/jetpack.php
on line 2306
Notice: Undefined index: shipping-first_name in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 198
Notice: Undefined index: shipping-last_name in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 199
Notice: Undefined index: shipping-company in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 200
Notice: Undefined index: shipping-address in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 201
Notice: Undefined index: shipping-address-2 in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 202
Notice: Undefined index: shipping-city in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 203
Notice: Undefined index: shipping-state in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 204
Notice: Undefined index: shipping-postcode in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 205
Notice: Undefined index: shipping-country in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 206
IMPORTANT:
Notice: Undefined variable: user_id in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 211
Notice: Undefined index: order_comments in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 256
Notice: Undefined index: billing-company in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 264
Notice: Undefined index: billing-address in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 265
Notice: Undefined index: billing-address-2 in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 266
Notice: Undefined index: billing-city in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 267
Notice: Undefined index: billing-postcode in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 268
Notice: Undefined index: billing-country in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 269
Notice: Undefined index: billing-state in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 270
Notice: Undefined index: billing-phone in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 272
Notice: Undefined index: shipping_method in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 282
Notice: Undefined index: payment_method in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 283
Notice: Undefined index: aiosp_edit in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php
on line 1105
Notice: Undefined index: nonce-aioseop-edit in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php
on line 1106
IMPORTANT:
Notice: Undefined variable: user_id in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 364
Notice: Undefined variable: available_gateways in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 379
IMPORTANT:
Fatal error: Call to a member function process_payment() on a
non-object in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 379
Notice: Undefined index: aiosp_enabled in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php
on line 710
Notice: Undefined index: aiosp_enabled in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php
on line 710
Notice: Use of undefined constant PLUGIN_URL - assumed 'PLUGIN_URL' in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/wp-google-fonts/google-fonts.php
on line 81
Notice: Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH'
in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/wp-google-fonts/google-fonts.php
on line 82
Notice: Undefined index: host in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jetpack/jetpack.php
on line 2306
Notice: Undefined index: shipping-first_name in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 198
Notice: Undefined index: shipping-last_name in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 199
Notice: Undefined index: shipping-company in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 200
Notice: Undefined index: shipping-address in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 201
Notice: Undefined index: shipping-address-2 in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 202
Notice: Undefined index: shipping-city in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 203
Notice: Undefined index: shipping-state in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 204
Notice: Undefined index: shipping-postcode in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 205
Notice: Undefined index: shipping-country in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 206
Notice: Undefined variable: user_id in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 211
Notice: Undefined index: order_comments in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 256
Notice: Undefined index: billing-company in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 264
Notice: Undefined index: billing-address in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 265
Notice: Undefined index: billing-address-2 in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 266
Notice: Undefined index: billing-city in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 267
Notice: Undefined index: billing-postcode in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 268
Notice: Undefined index: billing-country in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 269
Notice: Undefined index: billing-state in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 270
Notice: Undefined index: billing-phone in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 272
Notice: Undefined index: shipping_method in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 282
Notice: Undefined index: payment_method in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 283
Notice: Undefined index: aiosp_edit in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php
on line 1105
Notice: Undefined index: nonce-aioseop-edit in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php
on line 1106
Notice: Undefined variable: user_id in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 364
Notice: Undefined variable: available_gateways in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 379
IMPORTANT!!!!:
Fatal error: Call to a member function process_payment() on a
non-object in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php
on line 379
Notice: Undefined index: aiosp_enabled in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php
on line 710
Notice: Undefined index: aiosp_enabled in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php
on line 710
Notice: Use of undefined constant PLUGIN_URL - assumed 'PLUGIN_URL' in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/wp-google-fonts/google-fonts.php
on line 81
Notice: Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH'
in
/home2/findmyki/public_html/bolistylus/wp-content/plugins/wp-google-fonts/google-fonts.php
on line 82
There should be some text or json string in the response tab, but it's empty. This could be a result of php error that is hidden because of php settings in your server is set to hide all error messages, which is good.
Turn the debugging on see http://codex.wordpress.org/Editing_wp-config.php#Debug and try again. There should be some text in the response tab.
Update turn debugging on:
Something does not look right here. Do you get these errors when you send the Ajax request?
Looking at these errors I can see you have fatal error which must have stopped the code execution.
Fatal error: Call to a member function process_payment() on a non-object in /home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php on line 379
You have modified the original file jigoshop_checkout.class.php so it is hard for me to find the exact lines for these errors. But "Notice: Undefined index: " means there is an array variable in that line does not have an index of...
The method 'process_payment' called once in this file
// Process Payment
$result = $available_gateways[$this->posted['payment_method']]->process_payment( $order_id );
$available_gateways is an array with objects of different payment methods. But there is no object for the payment method defined in $this->posted['payment_method']
Also, I can see there is another error message state that the variable $available_gateways does not exists/defined
Notice: Undefined variable: available_gateways in /home2/findmyki/public_html/bolistylus/wp-content/plugins/jigoshop/classes/jigoshop_checkout.class.php on line 379
This variable can only be defined when jigoshop_cart::needs_payment() return true
if (jigoshop_cart::needs_payment()) :
// Payment Method
$available_gateways = jigoshop_payment_gateways::get_available_payment_gateways();
if (!isset($available_gateways[$this->posted['payment_method']])) :
jigoshop::add_error( __('Invalid payment method.','jigoshop') );
else :
// Payment Method Field Validation
$available_gateways[$this->posted['payment_method']]->validate_fields();
endif;
endif;
<input type="button" value="Submit" onClick="location.href='thankyou.php';">
If you don't need it to do anything else try that. You may need to edit the href to go where you want it to go. It worked for me on my site.
Also you can always have the action of the form redirect to another page then that page redirects to thank you page after processing.
Just use header('Location: '); to redirect.

Categories