Jump to content

Kholja

Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by Kholja

  1. I found a problem which might be a dealbreaker for a client. Let's say a client has two products in his cart. Right before clicking 'place order' (after typing in client date) he decides to remove one of the products. So he will navigate back to edit cart page (cart-edit.php template) and remove the product from the cart. The product is now removed from the cart, but padloper does not remove the product from the order (which is already created). The customer will find the product in the order-overview and has no chance to remove it from there.

    How could this be handled? Shouldn't Padloper take care of keeping cart and order in sync until order placement is completely done?

  2. 4 hours ago, kongondo said:

    This tells me you haven't added shipping countries to your shop, perhaps?

    Thanks that was the reason.  I lost this setting after some experimenting with shipping settings. But I got another related problem which brought me to that state. If I try to enter countries into the field Shipping Zone Countries it does not accept other entries than Germany. A view times it worked and I could enter i.e. Austria. But after saving padloper message said that the entry is not valid and deleted all entries. After some tries I now can only enter Germany. Any other entry does not work. Is there a place where I should set valid countries?

  3. Checkout shows me this error. After doing a bit of research, it turns out the reason is, that line 819

    $field = $this->getInputfieldForCustomerForm($inputfield);

    returns null for the field shippingAdressCountry. This field  is of type select which seems not handled correctly. In PadloperInputfieldHelpers.php getInputFieldSelect() returns without result, when $options['select_options'] is empty (which is true in my case).
    Somebody knows what to do here? Is there something wrong in my configuration?

  4. On 11/5/2021 at 12:41 AM, tires said:
    1. Is there a way to change existing files to secure ones?
    2. Do i necessarily need the line:
      $config->pagefileSecurePathPrefix = '-';

    Thanks and greets!

    I've done a small test. Let's say you have a template "onlymembers" with a files-field "members_pdf". In this case your pdf file is safe as soon as you set pagefileSecure to true AND restrict the access of the template "onlymembers" (i.e. remove all guest access rights). ProcessWire gave me a 404 page. You don't need the pagefileSecurePathPrefix line. It is set by default.

    Hope that helps.

    • Like 1
  5. This notice can happen if you use a page reference field in your template which has a wrong defined (i.e. deleted) parent page dependency.

    In my case I had a blog-post template which contained a page reference field to category pages. Additionally I had a parent page defined containing the categories. The error occured when I deleted this parent page.

    • Like 1
  6. If you (or somenone) needs a more "secure" method maybe an easy review process could be realised like this:

    1. Create two templates with similar fields (ie. article and article-draft).

    2. article-draft is only visible to specific usergroup (ie editors)

    3. after reviewing the editor could change the template from article-draft to article which is viewable by guests.

    This way you could also create a page showing a list of all article-draft pages, so the editor has an easy way to find all non-approved articles.

  7. If you just want to store some general configuration values without the need of a seperate admin page you simply could provide some configuration fields which you can access via module settings. It's a fast and easy way and it's covered in this post by Ryan:

    https://processwire.com/blog/posts/new-module-configuration-options/


  8. Snippet variation to achieve a optical better result.
    A little snippet addition to this older but maybe still useful post. If you use the orientation of an image to decide on your resize method you will often get an optical uneven impression, especially if aspect ratios of the images are very different (i.e. a row of logos).

    In this case it could be better to define a maximum width and a maximum height value which both should not exceed. Here's the variaton of  @Soma's snippet to achieve that.

    $mW = 180; // max width 
    $mH = 80; // max height
    $thumbUrl = ($mH / $image->height) > ($mW / $image->width) ? $image->size($mW,0)->url : $image->size(0,$mH)->url;

     

  9. I exported the site with ryans ProcessExportProfile Module and did a fresh install. This solved the problem. But would be nice to know what caused the issue.
    Thanks Adrian for your quick  response and your support. Your posts were often helpful und a good resource for learning ?

    • Like 1
  10. 2 minutes ago, adrian said:

    Is this speed affected by Tracy at all? Keep in mind that PW's core debug mode kicks in (if it's enabled) when logged in as superuser so there will be some impact from that.

    Definitely it affects the Frontend. I think a difference by factor about 20 (300ms -> 6s server response time) is probably not caused by the core. In terms of the backend I'm not sure if I'm starting to see ghosts... the impact there is not that big.
    Anyway - thanks for your precious input adrian. If i find out more I will post it here.

  11. "force su into dev mode" is not checked and there are no errors or warnings

    I didn't checked all panels, but It's enough to add one of them: ProcessWire Info or Request Info or Console or Panel Selector.

    It's not speeding up with i.e. Tracy Logs or ProcessWire Logs

    Backend works normal exept the pagetree. pagetree takes longer than usual.

  12. 2 minutes ago, adrian said:

    When you say "off", do you mean production mode, disabled "by unchecking the "Enable Tracy Debugger" checkbox, or is Tracy uninstalled?

    If in production mode, do you have emailing of logged errors enabled? I am wondering if you have a slow connection to your email service (SMTP or API).

    I tested both: Off can be "Enable Tracy Debugger" unchecked or uninstalling Tracy. Both leads to bad performance. If Tracy is enabled "Output Mode" can be "Production" or "Development". Both cases leads to normal operation. So maybe the question is what does Tracy change in the rendering process, when it is active.

  13. I  know this sounds crazy at first. I have a site which shows a very strange behaviour on the live server. The Site behaves normal as long as Tracy Debugger is ON. Response time is round about 200-300ms. As soon as I disable Tracy the response time grows to several seconds (6-7s !). Once the server answers, the rest of the assets deliver fast.
    Ideas where to begin a research welcome ?

  14. Thanks mr-fan and Adrian. In case it's useful for someone, here is how I solved the problem. In fact I did not use Hanna Code in the end but some regex stuff, together with Adrians AdminActions Module (great work btw). I think this way you can convert any type of wordpress shortcuts to cleaner Hanna Code, get rid of not needed attributes or convert shortcuts to HTML.

    Example: I wanted to convert this:

    [av_image src='https://www.domain.de/link/to/image.jpg' attachment_size='large' align='center' lot_more='attributes'][/av_image]

    to a regular img tag. So I used a regular expression like this one:

    /\[av_image.*src='([^']*)([^\]]*)\]\[/av_image\]/

    to match my shortcodes via the search and replace Action in AdminActions Module and replaced it with something like that:

    <img src="$1">

    Which leads to an ordinary image Tag. $1 stands for the first group which is the src attribute. With variations of this you can convert nearly everything. But if you're not familiar with regex (like me) it can be very tricky. Database restore feature of AdminActions Module saved me some times ?  For testing and learning I used this tool which helped me a lot in creating the regex Expressions: https://www.phpliveregex.com/

     

    • Like 1
  15. Thanks for the reply Adrian. I'm understanding your example. This is how I do it usually myself. In my case the original markup comes from the wordpress import (and the original Wordpress shortcuts). So I wanted to deal with what I got. If Hanna Code doesn't support closing tags I eventually have to find another way to convert the imported posts to fit Hanna Code.

  16. 1 minute ago, adrian said:
    
    [[av_textblock size='' font_color='' color='' text='Some Text']]

    Although I think giving site editors the ability to change font size or color beyond selecting from <hx> tags is a bad idea for keeping a nice looking site.

    I agree totally with you Adrian ?This is just an example what came out of the old WP Site. In this case the final result will just be surrounding div with a class. But The point is - how to catch the Text BETWEEN the tags and get rid of the end tag via Hanna Code.
    To make it more clear:

    [[av_textblock someAttributes]]
    Some Text
    [[/av_textblock]]


    should go into something like this:
     

    <div class="textblock">
    Some Text
    </div>

     

  17. Convert Wordpress shortcodes with "end tags" to Hanna Code

    I imported posts from a Wordpress site via WordpressMigrate Module. I used the Convert Shortcodes to Hanna Code Option. The Plan was to write some Hanna snippets to replace the former shortcode functionality. In most cases this works like a charm. But sometimes the codes uses kind of a Start - End Tag Syntax like this:

    [[av_textblock size='' font_color='' color='']]
    Some Text
    [[/av_textblock]]


    Anyone got an idea how to get a grip on this ? Is it possible with Hanna Code ?

  18. Hello Community, 
    just used AIOM for the first time and ran in some of the issues mentioned above. Got it to work with the help of this thread. Thank you guys. 

    Just in case someone finds it useful I add additionally some steps to update the CssMin Library quickly, until we get the next AIOM Update:

    • Create Folder site/modules/AllInOneMinify/lib/CssMin
    • Get the four files from: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/tree/master/src (Colors.php, Command.php, Minifier.php, Utils.php) and put them in the folder above.
    • Remove namespacing after php tag in these files (i.e. delete namespace tubalmartin\CssMin;)
    • Change code in site/modules/AllInOneMinify/AllInOneMinify.module:
    • Z.541 replace the require_once statement where it includes the CssMin Class File with:
    // require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'cssmin.php');
    require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Minifier.php');
    require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Colors.php');
    require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Command.php');
    require_once(wire('config')->paths->AllInOneMinify.'lib/CssMin'.DIRECTORY_SEPARATOR.'Utils.php');
    • Z.620 replace the following line
    // $cssMin = new CSSmin();
    $cssMin = new Minifier();

    That did the job for me.

×
×
  • Create New...