• Resolved razman

    (@razman-wan-fatul)


    Line breaks in Campaign Update textarea displays as \r\n after saved. Same issue?happening in the Reward textarea in Submit Campaign Form. This issue is not resolved since forever. I’ve posted and explained this issue on the Themeum support forum last year, and you said you will solve this in the future update. Unfortunately, after months of waiting, that future update did not include any of the fixes.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Hello Razman,

    I apologize for the delay and all the bad experiences with our product. 5 minutes earlier I had a long meeting with our developer team regarding all of your mentioned issues. They are taking your issues seriously and working on that with the highest priority.

    We need some time to find all the solutions for you. Sat and Sun day is our weekend. We will able to get back to you with solutions on Monday. So it will be more pleasing for me if you can allow us some time and cooperate with us.

    Regards

    ?Thanks a lot for being patient to get the solution.
    ?
    Replace line number 231 of ?wp-crowdfunding/includes/woocommerce/Actions.php with the following code

    ?$post_update = wpcf_function()->update_meta( $post_id, 'wpneo_campaign_updates', wp_slash($data_json) );

    We will apply this fix in the next update.

    Finally a solution for this (I posted this bug more or less 1 year ago in Themeum support page). I hope you start to take care of this plugin because seems little abandoned lastly, for example stripe-connect API is out-to-date since for more less 3 years ago… and there are a lot of things to improve that I posted in Themeum support as well.

    This issue also appears in the rewards description. How could we solve this?

    Thank you very much in advance.

    Hi there,

    We are taking all the Crowdfunding plugin issues with more care. We have a plan to release an update of our plugin today.

    Hopefully, you will found the plugin less buggy after the upcoming update. Please let us know if you find any issue after applying the update. We will try to fix the issue within a short time.

    Regards

    Sounds great, thanks for answer :)!

    You are welcome. We have released the update earlier. Please check that.

    Hello, the bug is not solved at all with the new version (2.0.3). The bug still remains for the selected rewards. wp-crowdfunding\includes\woocommerce\Woocommerce.php in function crowdfunding_order_type() you should save the reward in the order meta in other way (like you do in Submit_Form.php for example) and then display the selected reward correctly in the templates that apply (For example wp-crowdfunding\includes\woocommerce\Dashboard.php in function order_campaign_action()

    Hope you will solve in next update.

    Thread Starter razman

    (@razman-wan-fatul)

    yup, it’s still happening in Rewards field

    Hello @jordib and @razman-wan-fatul,

    We have tried to reproduce the line break issue locally. Every time we found it’s working fine for us on the campaign update and reward details field.

    Can you please send us the content that you have tried to input on those fields? And please share the output screenshot where you found the issue.

    Thread Starter razman

    (@razman-wan-fatul)

    Hi @mehedih

    This is the Reward input: https://pasteboard.co/J31b0Qw.jpg

    This is the reward output: https://pasteboard.co/J31bLRX.jpg

    Hello @razman-wan-fatul,

    I have tried to reproduce the issue as you have described. But it’s working fine for me.

    Input: https://prnt.sc/rwk412
    Output: https://prnt.sc/rwk36o

    Thread Starter razman

    (@razman-wan-fatul)

    @mehedih well it’s not working for me, as you can see. Can you login my website and try it yourself?

    What could be the cause?

    Hello @mehedih,

    Is working for wpneo_reward, but it’s not working in order meta for wpneo_selected_reward.

    When you select a reward in a project you use this function: function crowdfunding_order_type() in the following rute: wp-crowdfunding\includes\woocommerce\Woocommerce.php to save the reward in the order meta. As you can see inside this function you apply wpcf_function()->update_meta( $order_id, 'wpneo_selected_reward', $reward ); you do not apply wp_slash($reward) so the line breaks issue remains for wpneo_selected_reward.

    Hope this explanation helps you to solve the issue,
    best regards,
    Jordi

    Thread Starter razman

    (@razman-wan-fatul)

    @jordib did you manage to fix the issue? Which file do I need to edit to add the wp_slash($reward)? Thanks

    • This reply was modified 4 years, 7 months ago by razman.

    Hello @razman-wan-fatul,

    1. Open this file wp-crowdfunding\includes\woocommerce\Woocommerce.php
    2. look for this function: function crowdfunding_order_type()
    3. After this line: $reward = $rewards_data['wpneo_selected_rewards_checkout']; add the following: $reward_json = json_encode($reward,JSON_UNESCAPED_UNICODE);
    4. Then replace this: wpcf_function()->update_meta( $order_id, 'wpneo_selected_reward',$reward ); for this instead: wpcf_function()->update_meta( $order_id, 'wpneo_selected_reward', wp_slash($reward_json) );
    5. Now open this file: wp-crowdfunding\includes\woocommerce\Dashboard.php
    6. look for this function: function order_campaign_action()
    7. After this line: $r = get_post_meta($order_id, 'wpneo_selected_reward', true); add the following $r = json_decode($r, true);
    8. Then where you find this: echo "<div>{$r['wpneo_rewards_description']}</div>"; replace for the following echo "<div>". wpautop($r['wpneo_rewards_description'])."</div>";
    9. Now you have to do the same in all the templates where selected_reward is displayed.
    10. Here: \wp-crowdfunding\includes\woocommerce\Reward.php
    11. Look for this function: function selected_reward_in_order_review()
    12. Replace this echo "<div>{$reward_data['wpneo_rewards_description']}</div>"; for the following echo "<div>". wpautop($reward_data['wpneo_rewards_description']) ."</div>";
    – Look for this function function selected_reward_in_order_view($order) and repeat the steps 7 and 8 (In the 8 step only difference is you don’t write echo)

    Maybe more templates are affected but I didn’t find more for the moment.
    Hope it helps,
    Jordi

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Line breaks’ is closed to new replies.