Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @hueck00u,

    Thank you for your message.

    What’s the correct address for your website’s REST API? You don’t need to provide the full domain, just the path from the URL.

    Best,
    Mateusz

    Thread Starter hueck00u

    (@hueck00u)

    Hi Mateusz,
    The plugin WPML gave an error message that it cannot find REST API. So, I deactivated
    “Converter for Media Pro” and replaced the now empty file .htaccess by the initial .htaccess file. After this, WPML was happy concerning REST API. So, now it should be the standard DOMAIN/wp-json.
    Kind regards, Ulrich

    • This reply was modified 4 months, 1 week ago by hueck00u.
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hueck00u, is the error visible in the plugin now gone?

    Thread Starter hueck00u

    (@hueck00u)

    I went to “Settings” => “Permalinks” and “Save Changes” without changing anything. Then emptied the cache and re-activated the plugin “Converter for Media Pro”. Now it’s working (conversion ongoing) – and WPML also does not complain about REST API. So, it looks like the problem is solved via the refreshment of permalinks.
    What I didn’t like is making .htaccess empty on deactivating “Converter for Media Pro” without bringing .htaccess.bk back into usage as .htaccess

    • This reply was modified 4 months, 1 week ago by hueck00u.
    • This reply was modified 4 months, 1 week ago by hueck00u.
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hueck00u, our plugin doesn’t modify the .htaccess file in the WordPress root directory. The plugin modifies the .htaccess file in the /wp-content and /wp-content/uploads directories.

    Thread Starter hueck00u

    (@hueck00u)

    I am using the plugin “WP Original Media Path” and defined the media path as follows: Domain/files
    This caused “Converter for Media Pro” to place its .htaccess file into the following two directories:
    Domain (root directory) and Domain/files

    1.) Can I delete the .htaccess in the root directory and replace it by the original version?
    2.) Please adapt “Converter for Media Pro” such that it also works fine with “WP Original Media Path” regarding the .htaccess file in the root directory.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Thank you for your answer @hueck00u!

    I followed these steps on a clean WordPress installation:

    1. I installed the “WP Original Media Path” plugin.
    2. In the “Full URL path to files” field I set the value: https://my-domain.com/files.
    3. I uploaded some images to the Media Library.
    4. I installed the “Converter for Media” plugin and converted the files to WebP and AVIF formats.
    5. Files are available in WebP and AVIF formats. Everything works without any additional configuration (my server is Apache with support for .htaccess files).
    6. The plugin added rules to the .htaccess file in the WordPress root directory. This mechanism works by not removing any other rules that were in that file. The rules added by the plugin are located between the # BEGIN Converter for Media line and the # END Converter for Media line.
    7. The plugin added rules to the .htaccess file in the /files directory. This mechanism works by not removing any other rules that were in that file. The rules added by the plugin are located between the # BEGIN Converter for Media line and the # END Converter for Media line.
    8. The plugin added rules to the .htaccess file in the /wp-content/uploads-webpc directory. The rules added by the plugin are located between the # BEGIN Converter for Media line and the # END Converter for Media line.

    I can confirm full compatibility with the WP Original Media Path plugin. I can also confirm that our plugin was unable to remove any of your rules from any .htaccess file. Rules added by the plugin always fall between the # BEGIN Converter for Media line and the # END Converter for Media line.

    Thread Starter hueck00u

    (@hueck00u)

    Hi Mateusz,
    Thanks for your careful testing!
    My .htaccess files look different. If you would tell me your email address, then I could send them to you for your analysis.
    Kind regards, Ulrich

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @hueck00u, what does it mean that it looks different?

    Thread Starter hueck00u

    (@hueck00u)

    Below the only content of .htaccess after installation of “Converter for Media”.
    So, nothing of the standard WordPress rows found anymore in .htaccess

    BEGIN Converter for Media ! — DO NOT EDIT PREVIOUS LINE — !
    RewriteEngine On
    RewriteOptions Inherit
    RewriteCond %{QUERY_STRING} original$
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule . – [L]
    RewriteCond %{HTTP_ACCEPT} image/avif
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond /homepages/2/d174764896/htdocs/hsolar/wp-content/uploads-webpc/$1.jpg.avif -f [OR]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpg.avif -f
    RewriteRule (.+).jpg$ /wp-content/uploads-webpc/$1.jpg.avif [NC,T=image/avif,L]
    RewriteCond %{HTTP_ACCEPT} image/avif
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond /homepages/2/d174764896/htdocs/hsolar/wp-content/uploads-webpc/$1.png.avif -f [OR]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.png.avif -f
    RewriteRule (.+).png$ /wp-content/uploads-webpc/$1.png.avif [NC,T=image/avif,L]

    +++many similar rows+++

    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpeg.webp -f
    RewriteRule (.+).jpeg$ /wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,L]

    +++ ending IfModule and a block related to IfModule

    #! — DO NOT EDIT NEXT LINE — !
    #END Converter for Media

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    If they’re not there, they never were. @hueck00u, you can safely delete the file, and after re-saving the plugin settings, the rules will be added again.

    Thread Starter hueck00u

    (@hueck00u)

    So, I placed to original .htaccess into the root directory, then saved the “Converter for Media” options. Now the .htaccess has two sections:
    # BEGIN Converter for Media

    # END Converter for Media

    # BEGIN WordPress

    # END WordPress

    Thanks. You can close the issue.

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.