Title: Error trying to activate plugin
Last modified: August 22, 2016

---

# Error trying to activate plugin

 *  Resolved [jmdev](https://wordpress.org/support/users/jmdev/)
 * (@jmdev)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/)
 * Hi,
 * Right after installing the plugin while trying to activate it failed with the
   following error:
 * Fatal error: Call to a member function set_default_settings() on a non-object
   in /wp-content/plugins/a3-portfolio/admin/plugin-init.php on line 80
 * There are no other plugins running on the site, this is a fresh install of wordpress
   4.1
 * [https://wordpress.org/plugins/a3-portfolio/](https://wordpress.org/plugins/a3-portfolio/)

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

 *  Plugin Author [Steve Truman](https://wordpress.org/support/users/a3rev/)
 * (@a3rev)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/#post-5654645)
 * **Hello jmdev,**
 * Thank you for reporting that – have not had that happen on any of our tests site
   but have run some tests and found a way to replicate the issue. We have just 
   put out a new version with the Fix and credited you with reporting it in [the changelog](https://wordpress.org/plugins/a3-portfolio/changelog/).
 * Please try the install with the new version 1.0.2. and if you would not mind 
   letting me know here if it works ok for you with the new version.
 * Thank you – Steve
 *  Thread Starter [jmdev](https://wordpress.org/support/users/jmdev/)
 * (@jmdev)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/#post-5654665)
 * That did work and the plugin was able to activate it.
 * I had a couple problems:
    - One with the permalinks in the portfolio items (they were 404ing) that was
      resolved after updating the permalinks so you’re probably missing a flush_rewrite_rules();
      during the activation.
    -  Another one in the portfolio page, when I click in one of the porfolio items
      in the portfolio page it would give a javascript error as follows:
    -     ```
          Uncaught TypeError: undefined is not a functiona3.portfolio.min.js?ver=1.0.0:1 (anonymous function) jquery.js?ver=1.11.1:2
          m.Callbacks.jjquery.js?ver=1.11.1:2
          m.Callbacks.k.fireWithjquery.js?ver=1.11.1:2
          m.extend.readyjquery.js?ver=1.11.1:2
          J
          ```
      
    - This error went away once I installed the a3 Portfolio Isotope Add-on.
 * Thanks for the quick fix and feedback!
 *  Plugin Author [Steve Truman](https://wordpress.org/support/users/a3rev/)
 * (@a3rev)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/#post-5654678)
 * **Hello jmdev**
 * Thanks for the feedback
 * Re this:
 * _“One with the permalinks in the portfolio items (they were 404ing) that was 
   resolved after updating the permalinks so you’re probably missing a flush\_rewrite\
   _rules(); during the activation.”_
 * The plugin has the flush rewrite on activation function for when first install–
   we did not miss it – this is it
 *     ```
       if ( get_option('a3_portfolio_just_installed') == 'yes' ) {
          flush_rewrite_rules();
         }
       ```
   
 * jmdev I do not know with that code in the plugin why you would have had that 
   issue. Today on our local we did a fresh install of WordPress version 4.1 using
   the default twenty Fifteen theme – installed a3 Portfolios and the flush rewrite
   function worked perfectly. So I just don’t know what happen on your site as we
   cannot replicate it.
 * re this:
 * _“Another one in the portfolio page, when I click in one of the porfolio items
   in the portfolio page it would give a javascript error as follows:”_
 * jmdev – where did you see that? Where you using a debug tool to see it or did
   it show on the site? Was it a Chrome DE BUGGER tool?
 * Again we have tested it on both the clean install and on existing installs and
   cannot see that Notice using
 * WP_DEBUG return php error code which we always have on when doing any work
 * and also tested with
    Browser JS inspector for debug javascript, style and html
 * But the Uncaught TypeError notice that you posted gives us some clues – and if
   you can let me know the DE BUG tool that you where that show that Uncaught TypeError
   any other info that you think might be relevant – we can have another crack at
   it.
 * Thank you for your testing and feedback – it is most useful and appreciated.
 * Steve
 *  Thread Starter [jmdev](https://wordpress.org/support/users/jmdev/)
 * (@jmdev)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/#post-5654689)
 * Thanks for your response.
 * > The plugin has the flush rewrite on activation function for when first install–
   > we did not miss it – this is it
   >     ```
   >     if ( get_option('a3_portfolio_just_installed') == 'yes' ) {
   >        flush_rewrite_rules();
   >       }
   >     ```
   > 
 * It could be a problem while updating from the previous version, I haven’t tried
   to re-install it so if it is working for you right out the bat it should be fine
   as of now.
 * > “Another one in the portfolio page, when I click in one of the porfolio items
   > in the portfolio page it would give a javascript error as follows:”
   > jmdev – where did you see that? Where you using a debug tool to see it or did
   > it show on the site? Was it a Chrome DE BUGGER tool?
 * I was using the Google Chrome console, this error showed up before installing
   the “Portfolio Isotope Addon”
 * I currently do not have any problems with the Plugin, the only thing that bugs
   me is that after selecting show gallery under that only shows in the individual
   portfolio pages, it does not show like that in the actual “all” portfolios page,
   they just show as default ignoring these settings.
 * Thank you for your support! your portfolio rocks
 *  Plugin Author [Steve Truman](https://wordpress.org/support/users/a3rev/)
 * (@a3rev)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/#post-5654706)
 * Hello jmdev,
 * If this is still an issue for you
 * “_I currently do not have any problems with the Plugin, the only thing that bugs
   me is that after selecting show gallery under that only shows in the individual
   portfolio pages, it does not show like that in the actual “all” portfolios page,
   they just show as default ignoring these settings._“
 * Can you please mark this topic of yours as resolved and post a new topic about
   that issue. Much easier for others to follow if each topic is about a Single 
   issue.
 * If it is not something that you require help with that is great – could you please,
   Mark this topic as resolved.
 * re this:
    “_Thank you for your support! your portfolio rocks_”
 * Thank you – if you would give the plugin a 5 star [rating and a review](https://wordpress.org/support/view/plugin-reviews/a3-portfolio)
   Good reviews rank plugins higher in the WordPress search engine and make it easier
   for plugins to be found by others.
 * Steve
 *  Thread Starter [jmdev](https://wordpress.org/support/users/jmdev/)
 * (@jmdev)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/#post-5654712)
 * Thanks for fixing this.

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

The topic ‘Error trying to activate plugin’ is closed to new replies.

 * ![](https://ps.w.org/a3-portfolio/assets/icon.svg?rev=1049955)
 * [a3 Portfolio](https://wordpress.org/plugins/a3-portfolio/)
 * [Support Threads](https://wordpress.org/support/plugin/a3-portfolio/)
 * [Active Topics](https://wordpress.org/support/plugin/a3-portfolio/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/a3-portfolio/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/a3-portfolio/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [jmdev](https://wordpress.org/support/users/jmdev/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/error-trying-to-activate-plugin-1/#post-5654712)
 * Status: resolved