Title: error
Last modified: August 20, 2016

---

# error

 *  Resolved [osoru](https://wordpress.org/support/users/osoru/)
 * (@osoru)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/)
 * hi, i am having this error trying to activate your plugin
 * Plugin could not be activated because it triggered a fatal error.
 * Parse error: syntax error, unexpected ‘:’ in /home/sitename/public_html/wp-content/
   plugins/djd-site-post/djd-site-post.php on line 634
 * [http://wordpress.org/extend/plugins/djd-site-post/](http://wordpress.org/extend/plugins/djd-site-post/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/error-159/page/2/?output_format=md) [→](https://wordpress.org/support/topic/error-159/page/2/?output_format=md)

 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633218)
 * Hi, nothing fancy in that line. Care to tell me what version of php and WordPress
   you are running?
 * If you are able to please replace line 634.
 * Old line 634:
 *     ```
       throw new Exception( $djd_options['djd-post-fail'] ?: __('We were unable to accept your post at this time. Please try again. If the problem persists tell the site owner.', 'djd-site-post'));
       ```
   
 * New line 634:
 *     ```
       throw new Exception(__('We were unable to accept your post at this time. Please try again. If the problem persists tell the site owner.', 'djd-site-post'));
       ```
   
 * This way the plugin won’t use the Failure message specified in the settings panel.
   It will always use the one specified in that line of code instead. But for now
   it will help narrow the error down.
 * Wondering why this specific error is raised during plugin activation…
 *  Thread Starter [osoru](https://wordpress.org/support/users/osoru/)
 * (@osoru)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633231)
 * thank you for taking a look.
 * i am using the WordPress Version 3.5.1
 * i installed the plugin without any problems but when i try to activate, it report
   error.
 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633239)
 * Did you try to change line 634 in djd-site-post.php as I recommended before?
 * Or, just to see if it can be activated this way, comment out line 634 (just put
   two slashes at tghe beginning of the line: // throw new ..
 *  [kossut](https://wordpress.org/support/users/kossut/)
 * (@kossut)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633391)
 * Here is another:
 * **Parse error: syntax error, unexpected ‘:’ in /home/…/wp-content/plugins/djd-
   site-post/views/display.php on line 43**
 * I think, you should rewrite all lines which contains that **‘:’**
 * The idea of the plugin sounds nice. I can’t wait to try it!
 * Regards from Poland!
 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633395)
 * Thank you Kossut for the hint that there is more. Did you (or Osuru) try to change
   the code as I advised above? Would be helpful to know if it works after that 
   change since I have difficulties to reproduce the error – on my installs it just
   works.
 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633396)
 * Ok, got it now. You guys are running a php version prior 5.3, right? From php
   5.3 on you can skip the middle part when using the ternary operator ?: when constructing
   if-then-else expressions. Prior 5.3 you wrote
 *     ```
       a ? a : c
       ```
   
 * Beginning with 5.3 for the same result you can write
 *     ```
       a ?: c
       ```
   
 * This is what I’ve done in my code and obviously this causes a syntax error on
   php prior 5.3.
 * I think tomorrow or the day after I will have some time to fix this in my code
   for the sake of backwards compatibility. So look for an update coming during 
   the next couple of days. Otherwise you can fix the error by changing the lines
   in question the way I described above.
 *  [kossut](https://wordpress.org/support/users/kossut/)
 * (@kossut)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633397)
 * Yes. I’ve changed the line, and it started work. But I found that second error,
   I mentioned above.
 *  [kossut](https://wordpress.org/support/users/kossut/)
 * (@kossut)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633398)
 * In other words – your solution is right, but there is porbably more places to
   change.
 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633399)
 * Yeah, Kossut. That is no surprise for me anymore. As I said just five minutes
   before I’ve found what causes this error and I will fix it. Thanks for your participation.
 *  [kossut](https://wordpress.org/support/users/kossut/)
 * (@kossut)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633400)
 * I run PHP 5.2.17
 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633401)
 * Yes, that’s right. There are a couple more places. Basically all lines where 
   you find an expression containing the ternary operator ?:
 * Another solution of course would be to upgrade php to at least 5.3.
 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633402)
 * Guys, stay tuned. Right now I don’t have the opportunity to change the code but
   I will do it asap. So most probably tomorrow this issue will be fixed.
 *  [kossut](https://wordpress.org/support/users/kossut/)
 * (@kossut)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633403)
 * I can only ask hosting provider for that. And I’ll do it.
 *  [kossut](https://wordpress.org/support/users/kossut/)
 * (@kossut)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/error-159/#post-3633404)
 * Ok. The provider allowed me to change PHP versions. Now it works. The plugin 
   looks very nice! The only thing I would like to ask in next release is ability
   to upload photos by guest authors.
 *  Plugin Author [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * (@djarzyna)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/error-159/#post-3633408)
 * Ok, should work now even with php prior version 5.3.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/error-159/page/2/?output_format=md) [→](https://wordpress.org/support/topic/error-159/page/2/?output_format=md)

The topic ‘error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/djd-site-post_fbfbfb.svg)
 * [DJD Site Post](https://wordpress.org/plugins/djd-site-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/djd-site-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/djd-site-post/)
 * [Active Topics](https://wordpress.org/support/plugin/djd-site-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/djd-site-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/djd-site-post/reviews/)

 * 16 replies
 * 3 participants
 * Last reply from: [djarzyna](https://wordpress.org/support/users/djarzyna/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/error-159/page/2/#post-3633409)
 * Status: resolved