• Resolved Marcus

    (@power2009)


    Hi! There is an error in your plugin, specifically you are using a hard-coded path to the wp-content directory, which doesn’t always have the ‘wp-‘ prefix, and this causes the issue. I recommend you use a different method to determine the path to wp-content, because not everyone has it as ‘wp-‘, it could be ‘content’, ‘media’, ‘base’, or ‘site’; in my case, it’s ‘site’. That’s why the constant ‘IGD_CACHE_DIR’ is not defined correctly because you are using a hard-coded path like this: define( ‘IGD_CACHE_DIR’, ABSPATH . ‘wp-content/integrate-google-drive-cache’ ); instead of a dynamic one. I recommend defining it correctly, for example:

    // Get the path to the content directory
    $content_dir = WP_CONTENT_DIR;

    // Define the cache directory path by appending your cache folder name
    define( 'IGD_CACHE_DIR', $content_dir . '/integrate-google-drive-cache' );

    // Get the cache URL by appending the cache folder name to the content URL
    define( 'IGD_CACHE_URL', content_url() . '/integrate-google-drive-cache' );

    Sure! Here’s a more concise and clear recommendation in English for the plugin developer:

    Recommendation for Developer:

    To make the plugin compatible with custom content ‘WP_CONTENT_FOLDERNAME’ folder names (e.g., my_new_path instead of wp-content), use the dynamic WordPress constants WP_CONTENT_DIR and WP_CONTENT_URL instead of hardcoding paths. This ensures the plugin works correctly regardless of the content folder name.

    Here’s how to update the code:

    define( 'IGD_CACHE_DIR', WP_CONTENT_DIR . '/integrate-google-drive-cache' );
    define( 'IGD_CACHE_URL', WP_CONTENT_URL . '/integrate-google-drive-cache' );
    

    This approach adapts to any changes in the content folder name, providing better flexibility and compatibility.

    PS> I think need use WP_CONTENT_DIR /cache/integrate-google-drive correct folder )

    define( ‘IGD_CACHE_DIR’, WP_CONTENT_DIR . ‘/cache/integrate-google-drive’ );
    define( ‘IGD_CACHE_URL’, WP_CONTENT_URL . ‘/cache/integrate-google-drive’ );

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Marcus

    (@power2009)

    + PHP 8.4.2

    Exception::__construct(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead in \root\media-content\plugins\integrate-google-drive\vendors\Google-sdk\src\Google\IO\Exception.php on line 37

    Deprecated: IGDGoogle_IO_Exception::__construct(): Implicitly marking parameter $retryMap as nullable is deprecated, the explicit nullable type must be used instead in \root\media-content\plugins\integrate-google-drive\vendors\Google-sdk\src\Google\IO\Exception.php on line 37

    Hi Marcus,

    We sincerely apologize for any inconvenience this issue may have caused.

    To help us investigate the issue in detail, could you please create a ticket in our support portal? This will allow us to assist you more efficiently.

    You can create a ticket using the link below:
    https://softlabbd.com/support/

    Thread Starter Marcus

    (@power2009)

    This forum exists for this purpose. If you are unable to handle complaints on the technical forum, I don’t understand why you are even here! You constantly redirect people to your site without providing support. I believe it’s time to complain about the mechanism you are creating to drive people to your site so they can see the paid version of the plugin or subscribe to promotional newsletters, as at least every person leaves feedback. If you created this plugin in WordPress, follow the support rules or remove this plugin from the WordPress Free Add-ons. You haven’t properly provided support to any user, and in every message, if you check your responses, you redirect people to your damned site. It’s nonsense! Stop applying double standards and start helping people on the forum instead of redirecting them to links. Let security and moderators intervene in this dialogue and check your activities, because it seems to me that you are constantly redirecting people to your site for support and doing nothing substantial here except repeating “Go to the site, etc.” I believe I have provided you with information and a solution to the problem that you should communicate to your team, rather than just having people duplicate the same thing through the link and waste their time explaining the same thing over and over. Therefore, my response is a warning to you that your support for the free plugin is misleading, and you are promoting paid narratives to customers!

    Moderator Support Moderator

    (@moderator)

    @sazzad11 I recommend you and your co-workers consider ignoring this topic.

    @power2009 You are very wrong about support on this site.

    This forum exists for this purpose.

    These forums are for unpaid volunteers like @sazzad11 to offer support if they want to. Support is never mandatory and you are not owed even a reply let alone any support.

     If you are unable to handle complaints on the technical forum, I don’t understand why you are even here! 

    Your understanding is wrong.

     If you created this plugin in WordPress, follow the support rules or remove this plugin from the WordPress Free Add-ons.

    There is no such requirement and there never will be. Again, they do not owe you even a reply and if they never supported you or anyone else, that is fine.

     Let security and moderators intervene in this dialogue and check your activities

    No, that will not happen. They have done nothing wrong here at all.

    You haven’t properly provided support to any user

    That does not change anything. No one needs to support anyone and their plugin can remain. No rules have been broken by them at all.

    The person replied to you and you reacted badly. It is fine to not be satisfied with a person’s reply. It is not fine to demand or expect from them to tailor their replies to your liking.

    They do not owe you anything at all. Do not abuse volunteers attempting to help you for free again.

    Moderator Support Moderator

    (@moderator)

    @power2009 You attacked the developer in your report and in your reply here. Your new attack reply has now been archived.

    If you continue your abuse of the forums, you will be banned from this site.

    Plugin Author princeahmed

    (@princeahmed)

    Hi @power2009,

    First, we sincerely apologize for any inconvenience caused by our plugin or support.

    Regarding your suggestion to update our plugin’s code using internal WordPress core constants, we appreciate your input. However, the WordPress plugin review team strongly advises against using internal constants. Instead, they recommend using functions to maintain better compatibility and adhere to best practices. For this reason, we’ve implemented functions to determine cache directory locations.

    Here is a reference:

    ## Determine files and directories locations correctly

    WordPress provides several functions for easily determining where a given file or directory lives.

    We detected that the way your plugin references some files, directories and/or URLs may not work with all WordPress setups. This happens because there are hardcoded references or you are using the WordPress internal constants.

    Let’s improve it, please check out the following documentation:
    https://developer.ww.wp.xz.cn/plugins/plugin-basics/determining-plugin-and-content-directories/

    It contains all the functions available to determine locations correctly.
    Most common cases in plugins can be solved using the following functions:

    • For where your plugin is located: plugin_dir_path() , plugin_dir_url() , plugins_url()
    • For the uploads directory: wp_upload_dir() (Note: If you need to write files, please do so in a folder in the uploads directory, not in your plugin directories).

    Example(s) from your plugin:
    integrate-google-drive.php:29 define( ‘IGD_CACHE_DIR’, WP_CONTENT_DIR . ‘/integrate-google-drive-cache’ ); —–> WP_CONTENT_DIR

    Additionally, thank you for bringing to our attention the conflict with PHP v8.4 compatibility in the Google Drive PHP SDK. We are actively investigating the issue and will release an update shortly to address this compatibility problem.

    Thank you for your understanding and support!




    • This reply was modified 1 year, 3 months ago by princeahmed.
Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Fatal Error WP- prefix’ is closed to new replies.