If can correct this small issue will make lot of webmaster happy.
]]>Finally I found out, that one of the ModSec security rules of my provider (hoststar.ch) prohibited saving of the code. Temporarely disabling ModSec solved the problem.
In case other users of the wonderful plugin have similar problems, it would be helpful, if the plugin would substitute the appearance of the string “<?php” by something else on uploading (and recovr it after uploading).
Or is there another solution besides disabling security rules?
]]>I’m contacting you about Woocommerce Box Office. I have problem:
– I use a form to add products in Woocommerce, using the standard code to add products in woocommerce it works. But for the tickets, although the products are well added, at the end of the payment (validated) tickets do not appear (barcode dosent exist). And as if the customer had not purchased a ticket.
Other parameters probably need to be passed? Here’s my code (I only have one field, “email”). There’s nothing written in the documentation
$quantity_plein = isset($fields["form-field-hsynnx"])
? intval($fields["form-field-hsynnx"])
: 0;
$quantity_reduit = isset($fields["form-field-aliusd"])
? intval($fields["form-field-aliusd"])
: 0;
$quantity_gratuit = isset($fields["form-field-cvmmpf"])
? intval($fields["form-field-cvmmpf"])
: 0;
$product_quantities = [
5063 => $quantity_plein,
5065 => $quantity_reduit,
5066 => $quantity_gratuit,
];
foreach ($product_quantities as $product_id => $quantity) {
if ($quantity > 0) {
$product = wc_get_product($product_id);
WC()->cart->add_to_cart($product->get_id(), $quantity);
}
}
<?php get_header();
//are we getting all sermon series parent posts or are we getting all subposts of a sermon series?
$post_parent_qry = get_query_var( 'post_parent', 0 );
if ($post_parent_qry == 0) {
$args = array('post_type' => 'message', 'post_parent' => (int) $post_parent_qry, 'posts_per_page'=>'20','order' => 'DESC');
} else {
$args = array('post_type' => 'message', 'post_parent' => (int) $post_parent_qry, 'posts_per_page'=>'20','order' => 'ASC');
}
query_posts($args);
?>
<div id="main-content">
<div class="container">
<div id="content-area" class="clearfix">
<div id="left-area">
<?php
//dcrosbie show parent post info
if ((int) $post_parent_qry > 0) {
echo "<h1>Sermon Series: " . get_the_title ((int) $post_parent_qry) . "</h1>";
echo get_the_post_thumbnail( (int) $post_parent_qry, 'full' );
echo "<p style='margin:30px'>" . get_post_field('post_content', (int) $post_parent_qry) . "</p>";
echo "<hr/>";
}
if ( have_posts() ) :
while ( have_posts() ) : the_post();
$post_format = et_pb_post_format();
$post_parent_id = wp_get_post_parent_id( $post_ID );
if ($post_parent_id == 0) {
//displaying sermon series parent posts
$the_post_link = get_site_url() . "/message/?post_parent=" . get_the_ID();
} else {
//display subposts or a parent sermon series
$the_post_link = get_permalink();
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post' ); ?>>
<?php
$thumb = '';
$width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 );
$height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 );
$classtext = 'et_pb_post_main_image';
$titletext = get_the_title();
$thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' );
$thumb = $thumbnail["thumb"];
et_divi_post_format_content();
if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) {
if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) :
printf(
'<div class="et_main_video_container">
%1$s
</div>',
$first_video
);
elseif ( ! in_array( $post_format, array( 'gallery' ) ) && 'on' === et_get_option( 'divi_thumbnails_index', 'on' ) && '' !== $thumb ) : ?>
<a href="<?php echo $the_post_link ?>">
<?php print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?>
</a>
<?php
elseif ( 'gallery' === $post_format ) :
et_pb_gallery_images();
endif;
} ?>
<?php if ( ! in_array( $post_format, array( 'link', 'audio', 'quote' ) ) ) : ?>
<?php if ( ! in_array( $post_format, array( 'link', 'audio' ) ) ) : ?>
<h2 class="entry-title"><a href="<?php echo $the_post_link ?>"><?php the_title(); ?></a></h2>
<?php endif; ?>
<?php
et_divi_post_meta();
if ( $post_parent_id == 0 ) {
the_content();
} else {
truncate_post( 270 );
}
?>
<?php endif; ?>
</article> <!-- .et_pb_post -->
<?php
endwhile;
if ( function_exists( 'wp_pagenavi' ) )
wp_pagenavi();
else
get_template_part( 'includes/navigation', 'index' );
else :
get_template_part( 'includes/no-results', 'index' );
endif;
?>
</div> <!-- #left-area -->
<?php dynamic_sidebar('sermon-sidebar'); ?>
</div> <!-- #content-area -->
</div> <!-- .container -->
</div> <!-- #main-content -->
<?php get_footer(); ?>
]]>***********************************************
DATABASE:
***********************************************
BUILD MODE: MYSQLDUMP
MYSQLTIMEOUT: 5000
MYSQLDUMP: Is Supported
MYSQL DUMP ERROR 2
===============================================
DUPLICATOR ERROR
Please try again! If the error persists see the Duplicator 'Help' menu.
-----------------------------------------------
MESSAGE:
Shell mysql dump error. Change SQL Mode to the "PHP Code" in the Duplicator > Settings > Packages
So I changed the SQL Mode from Mysqldump to PHP Code and the backup started to work again. My Duplicator version is 1.5.4. My backup size is around 263MB.
Why Mysqldump mode doesn’t work anymore?
Thank you!
]]>