• Resolved axcelia

    (@axcelia)


    I’ve got an odd problem with the Customer Area Plugin and Autoptimize.
    The Customer Area contains a number of files that logged in users can download.
    Some of these files are quite large (128mb for example).

    When Autoptimize is enabled we get a 404 error file could not be found message instead of the file.
    When I check the logs I discovered it has run out of memory.
    “AH01215: PHP Fatal error: Out of memory (allocated 176422912) (tried to allocate 125173548 bytes) in ****/wp-includes/functions.php on line 3598: ****/index.php

    When autoptimize is disabled the file is found fine.

    What I’m wondering is this, would it be possible to disable autoptimize for selected pages? I’d like to keep using autoptimize for the rest of the site. Or can you suggest something I could try to get them to work together?

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Hi axcelia;
    disabling pages can be done using the API, e.g. assuming the customer zone is at /customer-zone/;

    add_filter('autoptimize_filter_noptimize','axcelia_noptimize',10,0);
    function axcelia_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'/customer-area/')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    Now what would be more interesting is finding out what makes those docs throw a 404 in the first place, but I would need more info to understand what is happening there …

    frank

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin conflict with Customer Area can I disable on certain pages?’ is closed to new replies.