Forum Replies Created

Viewing 15 replies - 1 through 15 (of 33 total)
  • Thread Starter danielecelsa

    (@danielecelsa)

    Thank you for your answer.

    I think I fixed it, I realized my definition:
    define(‘WP_MEMORY_LIMIT’, ‘1024M’);
    was at end of file but it must be before the line:
    /* That’s all, stop editing! Happy publishing. */

    That’s why probably this setting was not used.
    Probably the way you suggested would work too (thanks!), but seems working also this way.

    And Permalink is not breaking at the moment! ??

    I will let you know if something changes and it broke again (I will in case try WP_MAX_MEMORY_LIMIT), till now thanks again for your help ??

    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello,

    sorry for late answer and thanks for yours.

    To debug, I activated define(‘SCRIPT_DEBUG’, true); in wp-config.php and monitored both Chrome Dev Tools and debug.log

    First of all, I want to say that my setup was:
    – on AWS, ‘max_allowed_packet’ almost to the max value possible (almost 1GB) (you said it is more than enough, but I left at this value)
    – on wp-config.php, I added define(‘WP_MEMORY_LIMIT’, ‘256M’); at the end of file

    When I launched Permalink and it broke, in Chrome dev Tool I only found an error 500 with a Notice:
    Constant WP_MEMORY_LIMIT already defined in /var/www/html/wp-config.php on line 110
    However, in debug.log I found the same Notice, but also a Fatal error:
    PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 41946952 bytes) in /var/www/html/wp-includes/wp-db.php on line 3159

    So I tried commenting the define line in wp-config.php
    Notice disappeared but I still had the Fatal saying the same

    Then I tried adding in wp-config.php:
    define(‘WP_MEMORY_LIMIT’, ‘1024M’);
    because I thought maybe is not enough (since Fatal says 268435456 bytes).
    In this case, I got the same situation of the first attempt, so the Notice + the Fatal error saying the same:
    PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 41946952 bytes) in /var/www/html/wp-includes/wp-db.php on line 3159

    Is there something that you think I could do at this point?

    Thanks in advance for your always kind answer,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Dear Maciej,

    while waiting your kind answer, I’d just like to add that I increased ‘max_allowed_packet’ almost to the max value possible (almost 1GB), through the Parameter Group (PG) feature of AWS for RDS, as they suggest to do.

    As I said, this didn’t solve the issue and Permalink keeps crashing when I try to Regenerate URI, so I am hoping you can suggest me how to increase that value client side too, hoping this can solve the issue.

    Thanks in advance,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Ok thanks, very clear.

    So, I am trying to increase ‘max_allowed_packet’, I actually already did it on my mysql DB but I still get the issue.
    Following the link you suggested me, I see that actually it can be increased server side and client side.
    I suppose that server side is my db, and client side is your plugin Permalink Manager.
    So could you suggest me how to increase this value client side?

    Thanks in advance and sorry if I misunderstood,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello Maciej,

    thanks for your answer.

    Just didn’t get if you are talking about the issue that the URIs of most of the new CPTs created are wrong, or the issue that Regenerate tool crashes?

    Anyway, what would be the problem in increasing that value?
    In the link you provided it seems to me that it is safe, but your ‘I am sorry, but I am not able to provide you any other solutions‘ makes me think that maybe I am missing something ahaha

    Thanks again,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Sorry I put the wrong link and I cannot edit the post (it is held for moderation), the right one is this one:
    https://imgur.com/a/H627LWk

    Thanks again,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    I also add that I restarted Apache and that I have a big number of posts (more than 400k)

    The creation of snapshot, however, stops around 100 seconds after 55/89 – Copying table wp_postmeta starts.

    Thanks,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello,

    thanks for your help.

    I tried this implementation and seems working:
    https://imgur.com/a/suNp5If

    I think it is the same of the one you proposed above, just less clean.. ??
    Can you confirm?

    Thanks for your help, after your confirmation we can close the case ??
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello,

    here a screenshot of my snippet, below there is another one to limit also the length of the review content:
    https://imgur.com/a/6mT2lTh

    Limit the length of review actually works, means that if I try to write more than 500 characters, I just can’t (I do not receive any red warning when try to submit, simply because I cannot write more than 500)

    I would prefer some red warning when try to submit like in your example:
    https://imgur.com/WIcfRAk
    but could be ok also if writing more than 80 characters would not be allowed (like for the review content)

    I don’t think I made some other particular customization.

    Maybe I should make the code for title similar to the one of the review? Like using the filter “review-form

    Thanks in advance

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello,

    option 1 would be fine for me, and I guess the javascript file is loaded because in the other fields I receive the warning, as you can see here:
    https://imgur.com/a/mLXcBHb

    But for the title, I do not receive any red warning even if I write more than 80 character. In this case, the review seems submitted but actually it is not.
    Here you can see that I do not receive the red warning (I wrote more than 80 words):
    https://imgur.com/a/yIdLBdq

    Maybe I should add something to the code?

    Thanks in advance as always,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello,

    thanks for your answer.

    Unfortunately the behavior is not what I was expecting:
    it seems that, when you write the title, there is not any limit and you can write as much as you want.
    BUT, if you try to submit the review, the review is not submitted and no advice or message about unsuccessful submitting is shown.

    Is there a way to better handle this situation of long title?
    Something that shows the limit when you write it or that tells you that the review is not submitted since the title is too long?

    As I showed you in first message, it seems a big bug since all the reviews become unformatted if the title of one is too long (and without spacing).

    Thanks a lot,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Thank you very much, it works!

    Thread Starter danielecelsa

    (@danielecelsa)

    Hello,

    I am using WP Rocket plugin, I guess no caching implemented server-side.

    Thanks in advance,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Ok thank you very much for the explanation.

    Cheers,
    Daniele

    Thread Starter danielecelsa

    (@danielecelsa)

    Yes ?? thanks again!

Viewing 15 replies - 1 through 15 (of 33 total)