Support » Allgemeine Fragen » [Media Upload] Bilder werden mit Umlauten hochgeladen, aber Ziel URL ist ohne!

Ansicht von 3 Antworten - 1 bis 3 (von insgesamt 3)
  • Edi

    (@psychosopher)

    Ich würde prinzipiell keine Umlaute in Dateinamen verwenden. Das „Umschreiben“ von Umlauten und etlichen Spezialzeichen ist heikel und führt immer wieder zu Schwierigkeiten.

    Im entsprechenden Post kann ich keinen Coupon und auch keinen Drucken-Button finden. Ich kann Dir deshalb nicht sagen, was da passiert.

    Thread-Starter JensGoro

    (@jensgoro)

    Guten Morgen,

    Umlaute werden von WordPress automatisch umgeschrieben (ä in ae, ü in ue, ..).
    Ich bin jetzt noch etwas tiefer in das Problemfeld gestoßen, denn wenn ich den Coupon per WordPress Backend hochlade, so wird der Coupon auch richtig umgesetzt (fuer statt für).
    Der Test Deal ist hier zu finden: http://premium-lizenz.com/-/dies-ist-ein-test-deal/

    Ich habe den PHP Code raus gesucht und noch getestet, wie es sich mit dem „Deal Bild Upload“ verhält (siehe PHP-Code). Dort funktioniert es auch korrekt :O
    Wenn ich dann aber die Funktion der Bild Auswahl (siehe PHP Code) nutze, so funktioniert es nicht und die Umlaute werden wie ich schon schrieb nicht umgewandelt, bzw. aus der URL entfernt.

    http://premium-lizenz.com/deal-eintragen/
    
    <?php
    /**
     * Listing Submit Details Template.
     *
     * @package Clipper\Templates
     * @author  AppThemes
     * @since   Clipper 1.6
     */
    ?>
    <?php
    if ( function_exists( 'ot_get_option' ) ) {
    $coupon_thumb = ot_get_option( 'rw_allow_coupon_thumb' , 'on');
    }?>
    
    <div id="content">
    
    	<div class="content-box">
    
    		<div class="box-holder">
    
    			<div class="blog">
    
    				<h1><?php _e( 'Share a Coupon', RW_CP_TD ); ?></h1>
    
    				<div class="content-bar"></div>
    
    				<div class="text-box-form">
    
    					<p><?php _e( 'Complete the form below to share your coupon with us.', RW_CP_TD ); ?></p>
    
    				</div>
    
    			</div> <!-- #blog -->
    
    			<div class="post-box">
    
    				<?php do_action( 'appthemes_notices' ); ?>
    
    				<form id="couponForm" method="post" class="post-form" enctype="multipart/form-data" action="<?php echo esc_url( appthemes_get_step_url() ); ?>">
    
    					<input type="hidden" name="action" value="<?php echo esc_attr( $action ); ?>">
    					<?php wp_nonce_field( $action ); ?>
    
    					<fieldset>
    
    <ol>
    <li>
    								<label><?php _e( 'Coupon Title:', RW_CP_TD ); ?> </label>
    								<input type="text" class="text required" id="post_title" name="post_title" value="<?php echo esc_attr( $listing->post_title ); ?>" />
    							</li>
    <li>
    								<label><?php _e( 'Store:', RW_CP_TD ); ?></label>
    								<?php clpr_dropdown_coupon_stores( $listing->store_id ); ?>
    							</li>
    							<li id="new-store-name" class="new-store">
    								<label><?php _e( 'New Store Name:', RW_CP_TD ); ?></label>
    								<input type="text" class="text" name="new_store_name" value="" />
    
    							<li id="new-store-url" class="new-store">
    								<label><?php _e( 'New Store URL:', RW_CP_TD ); ?> </label>
    								<input type="url" class="text" id="new_store_url" name="new_store_url" value="" />
    
    <li>
    								<label><?php _e( 'Coupon Category:', RW_CP_TD ); ?> </label>
    								<?php clpr_dropdown_coupon_categories( $listing->category_id ); ?>
    							</li>
    <li>
    								<label><?php _e( 'Coupon Type:', RW_CP_TD ); ?> </label>
    								<?php clpr_dropdown_coupon_types( $listing->type_id ); ?>
    							</li>
    							<li id="ctype-coupon-code" class="ctype">
    								<label><?php _e( 'Coupon Code:', RW_CP_TD ); ?> </label>
    								<input type="text" class="text" name="clpr_coupon_code" value="<?php echo esc_attr( $listing->clpr_coupon_code ); ?>" />
    
    							<?php if ( clpr_has_printable_coupon( $listing->ID ) ) { ?>
    								<li id="ctype-printable-coupon-preview" class="ctype">
    									<label><?php _e( 'Current Coupon:', RW_CP_TD ); ?> </label>
    									<?php echo clpr_get_printable_coupon( $listing->ID ); ?>
    
    							<?php } ?>
    
    							<li id="ctype-printable-coupon" class="ctype">
    								<label><?php _e( 'Printed Coupon:', RW_CP_TD ); ?> </label>
    								<input type="file" class="fileupload text" name="coupon-upload" />
    
    <li>
    								<label><?php _e( 'Destination URL:', RW_CP_TD ); ?></label>
    								<input type="url" class="text required" name="clpr_coupon_aff_url" value="<?php echo esc_url( $listing->clpr_coupon_aff_url ); ?>" />
    							</li>
    <li>
    								<label><?php _e( 'Expiration Date:', RW_CP_TD ); ?> </label>
    								<input type="text" class="text datepicker" name="clpr_expire_date" value="<?php echo esc_attr( $listing->clpr_expire_date ); ?>" />
    							</li>
    <li>
    								<label><?php _e( 'Tags:', RW_CP_TD ); ?> </label>
    								<input type="text" class="text" name="<?php echo APP_TAX_TAG; ?>" value="<?php echo clpr_get_listing_tags_to_edit( $listing->ID ); ?>" />
    								<p class="tip"><?php _e( 'Separate tags with commas', RW_CP_TD ); ?></p>
    							</li>
    <?php if($coupon_thumb=='on'){?>
                                <li id="coupon-thumbnail">
                                <label><?php _e( 'Coupon Thumbnail:', RW_CP_TD ); ?> </label>
                                <input type="file" class="fileupload text" name="coupon-thumbnail" />
    
                                <?php if ( RW_has_coupon_thumbnail( $listing->ID ) ) { ?>
    								<li id="ctype-coupon-thumbnail-preview">
    									<label><?php _e( 'Current Coupon Thumbnail:', RW_CP_TD ); ?> </label>
    									<?php echo RW_get_coupon_thumbnail( $listing->ID ); ?>
    
    							<?php } ?>
    							<?php }?>
    
    							<li class="description">
    								<label for="post_content"><?php _e( 'Full Description:', RW_CP_TD ); ?> </label>
    								<?php if ( $clpr_options->allow_html && ! wp_is_mobile() ) { ?>
    									<?php wp_editor( $listing->post_content, 'post_content', clpr_get_editor_settings() ); ?>
    								<?php } else { ?>
    									<textarea class="required" id="post_content" cols="30" rows="5" name="post_content"><?php echo esc_textarea( $listing->post_content ); ?></textarea>
    								<?php } ?>
    
    <li>
    								<?php
    									// include the spam checker if enabled
    									appthemes_recaptcha();
    								?>
    							</li>
    							<?php
    								$button_text = __( 'Share It!', RW_CP_TD );
    								if ( clpr_payments_is_enabled() ) {
    									$button_text = __( 'Continue', RW_CP_TD );
    									do_action( 'appthemes_purchase_fields' );
    								}
    							?>
    
    <li>
    								<button type="submit" class="btn coupon" id="submitted" name="submitted" value="submitted"><?php echo esc_html( $button_text ); ?></button>
    							</li>
    </ol>
    					</fieldset>
    
    					<!-- autofocus the field -->
    					<script type="text/javascript">try{document.getElementById('post_title').focus();}catch(e){}</script>
    
    				</form>
    
    			</div> <!-- #post-box -->
    
    		</div>
    
    	</div>
    
    </div>
    
    <?php get_sidebar( 'submit' ); ?>

    Demnach sollte bei dem PHP Code „<input type=“file“ class=“fileupload text“ name=“coupon-upload“ />“ der Fehler vermuten zu sein?

    Oder aber es ist der Code des Buttons, der das Problem verursacht:

    <?php
    /**
     * Coupon Code Box content - Printable Coupon.
     *
     * @package Clipper\Templates
     * @author  AppThemes
     * @since   Clipper 1.6
     */
    ?>
    
    <div class="couponAndTip">
    
    	<div class="link-holder">
    
    		<a>" id="coupon-link-<?php echo $post->ID; ?>" class="coupon-code-link print_code" title="<?php _e( 'Click to Print', RW_CP_TD ); ?>" target="_blank" data-clipboard-text="<?php _e( 'Print Coupon', RW_CP_TD ); ?>"><span><?php _e( 'Print Coupon', RW_CP_TD ); ?></span></a>
    
    	</div> <!-- #link-holder -->
    
    	<p class="link-popup"><span><?php _e( 'Click to print coupon', RW_CP_TD ); ?></span></p>
    
    </div><!-- /couponAndTip -->

    Moderationshinweis: Unser Forum unterstützt kein BBCode. Code bitte in Backticks (`) setzen. Danke, Bego

    Edi

    (@psychosopher)

    Umlaute werden von WordPress automatisch umgeschrieben (ä in ae, ü in ue, ..).

    Aber nicht jeder Server, falls einmal ein Umzug ansteht, jedes Plugin oder jeder Browser kommen damit zurecht. Zudem gibt es verschiedene Möglichkeiten, Umlaute usw. umzuschreiben.

    Aber auch dafür/dagegen gibt es ein Plugin:

    https://de.wordpress.org/plugins/clean-image-filenames/

Ansicht von 3 Antworten - 1 bis 3 (von insgesamt 3)
  • Das Thema „[Media Upload] Bilder werden mit Umlauten hochgeladen, aber Ziel URL ist ohne!“ ist für neue Antworten geschlossen.