Support » Plugin: DJD Site Post » error

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author djarzyna

    (@djarzyna)

    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…

    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

    (@djarzyna)

    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 ..

    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

    (@djarzyna)

    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

    (@djarzyna)

    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.

    Yes. I’ve changed the line, and it started work. But I found that second error, I mentioned above.

    In other words – your solution is right, but there is porbably more places to change.

    Plugin Author djarzyna

    (@djarzyna)

    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.

    I run PHP 5.2.17

    Plugin Author djarzyna

    (@djarzyna)

    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

    (@djarzyna)

    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.

    I can only ask hosting provider for that. And I’ll do it.

    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

    (@djarzyna)

    Ok, should work now even with php prior version 5.3.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘error’ is closed to new replies.