Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #52331
    Petralit
    Participant

    Hi! After I upgraded my website to PHP 8 (WP 6.1.1) there’s an error message:

    Warning: The magic method Download_Attachments::__wakeup() must have public visibility in /homepages/14/xxxxxxxxxx/htdocs/Autorenblog/wp-content/plugins/download-attachments/download-attachments.php on line 106

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/14/xxxxxxxxxx/htdocs/Autorenblog/wp-content/plugins/download-attachments/download-attachments.php:106) in /homepages/14/xxxxxxxxxx/htdocs/Autorenblog/wp-admin/includes/misc.php on line 1416

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/14/xxxxxxxxxx/htdocs/Autorenblog/wp-content/plugins/download-attachments/download-attachments.php:106) in /homepages/14/xxxxxxxxxx/htdocs/Autorenblog/wp-includes/functions.php on line 6865

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/14/xxxxxxxxxx/htdocs/Autorenblog/wp-content/plugins/download-attachments/download-attachments.php:106) in /homepages/14/xxxxxxxxxx/htdocs/Autorenblog/wp-admin/admin-header.php on line 9

    I managed to eliminate the error message by setting /Autorenblog/wp-content/plugins/download-attachments/download-attachments.php on line 106 from private to public, but I don’t know if there might be further problems with downloads. It would be better to get an update for this plugin to work properly with PHP 8 or higher.

    #52546
    Ecom
    Participant

    I also have the same error, do you think you can solve the problem?

    #53339
    tiilix2
    Participant

    I have same problem too

    Petralit wrote:

    I managed to eliminate the error message by setting /Autorenblog/wp-content/plugins/download-attachments/download-attachments.php on line 106 from private to public..

    I opened that file in ftp but in line 106 there is anything about “private”

    #53340
    tiilix2
    Participant

    Now I found the line
    I opened that file line 106 :

    private function __wakeup() {

    How should I change that line?

    changin public function __wakeup() { did not help

    #53354
    tiilix2
    Participant

    Is there anyone that can help?

    In php 7.4 download attachment works but in php 8.1 it makes a critical error

    #53376
    tiilix2
    Participant

    If I choose option Display position “after” that plugin works in php 8.1 (without [download-attachments] – tag) but that works only i normal pages.

    I use that plugin in woocommerce and there the option “after content” dont show anything. To show the plugin in woocommerce I have to use shortcode [download-attachments] which work only in php 7.4

    If I try to use some other plugin, working in php 8.1, I have to add attachments again for about 100 products!!!

    #56474
    patriciabin
    Participant
    This reply has been marked as private.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.