Support

Account

Home Forums General Issues ACF_LITE already defined?

Solved

ACF_LITE already defined?

  • Hi guys. So, I have this stupid issue: it seems that ACF_LITE is already defined (even if is only defined on line 2 of functions.php)

    The trick is this:
    – i’m developing on a local server, whith php 5.4 (if that matters) and WP 3.7. Everything works great.
    – i’m uploading to stage (which have php 5.3) and also WP3.7. Here is where i got the problem (ACF_LITEis already defined).

    Plugins are used as plugins (not as inclusions) and i’m using:
    ACF 4.2.2
    ACF Options 1.2.0
    AF Repeater 1.0.1

    Also i noticed that on local server custom fields are loaded if i just require the file & instantiate the class, while on stage server they need to be loaded via acf/register_fields hook.

    
      define( 'ACF_LITE', !WP_DEBUG);
      if( ACF_LITE ){
        require_once( 'includes/acf.php' ); // custom fields that are exporyed as array
      }
    

    I’m really out of ideas on what should i try and i started to think that there is an issue with the server.

    Thanks!

  • Hi @iamntz

    Your title says it all.

    If ACF_LITE is already defined, then something else is defining it. Have you done a text search through the theme and plugins files for ‘ACF_LITE’?

    Thanks
    E

  • I did. There is no other occurences.

    That’s why i said it’s stupid 🙂

  • I think i found the culprit: on local i had ACF 4.3.0 and on stage was 4.2.2.
    It’s pretty weird, but… works now 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘ACF_LITE already defined?’ is closed to new replies.