Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author cpres

    (@cpres)

    That’s incredibly strange. I see that as the end to the redirect function..

    function redirect($location = '', $msgtype = '', $message = '') {
            $url = $location;
            $url = ($_GET['single']) ? $url."&single=".$_GET['single'] : $url;
            if ($msgtype == "message") {
                $url .= '&' . $this->pre . 'updated=true';
            } elseif ($msgtype == "error") {
                $url .= '&' . $this->pre . 'error=true';
            }
            if (!empty($message)) {
                $url .= '&' . $this->pre . 'message=' . urlencode($message);
            }
            ?>
            <script type="text/javascript">
                window.location = '<?php echo (empty($url)) ? get_option('home') : $url; ?>';
            </script>
            <?php
            flush();
        } <---- Line 326

    Did you try and activate again?

    Thread Starter techsurgeons

    (@techsurgeons)

    That’s the spot it’s crashing out at.

    I tried it on three different sites and a couple different servers. Same error.

    I agree it’s bizarre. How can I help debug?

    -J

    Thread Starter techsurgeons

    (@techsurgeons)

    Hey, I’m not (yet) good with PHP, but this seems odd…

    <?php
    flush();
    }

    Shouldn’t there be a “?>” after the flush? Or is the “<?php” extraneous?

    -J

    Thread Starter techsurgeons

    (@techsurgeons)

    And I see two different ways you assign a script variable. The top one is the function giving me an error.

    <script type=”text/javascript”>
    window.location = ‘<?php echo (empty($url)) ? get_option(‘home’) : $url; ?>’;
    </script>

    <script type=”text/javascript”>
    var base_plupload_config=<?php echo json_encode($plupload_init); ?>;
    </script>

    Plugin Author cpres

    (@cpres)

    Try changing it to:

    $url = (empty($url)) ? get_option('home') : $url;
    
            echo '<script type="text/javascript">';
            echo 'window.location = "'.$url.'"';
            echo '</script>';
            flush();

    ?

    Thread Starter techsurgeons

    (@techsurgeons)

    That worked. However… ??

    Now I’m getting a very similar error on line 550 from a very similar function.

    ?>
        <script type="text/javascript">
            var base_plupload_config=<?php echo json_encode($plupload_init); ?>;
        </script>
        <?php
        }

    After trying to fix the above using similar code (or even commenting it out), I get a

    Parse error: syntax error, unexpected end of file in /home/www/webhost4/website.com/htdocs/wp-content/plugins/slideshow-satellite/slideshow-satellite-plugin.php on line 841

    Thread Starter techsurgeons

    (@techsurgeons)

    And one more datapoint… 2.0.2 seems to work fine.

    Yes, with the same code for redirect() as 2.2. So I’m not sure what broke in the update.

    I hope this plugin is worth the headache of trying to get it to work. ??

    Plugin Author cpres

    (@cpres)

    Haha, I hope it’s worth the headache for your sake too! And for the other people dealing with this i’m sure it is.

    echo "<script type='text/javascript'>";
            echo "var base_plupload_config=".json_encode($plupload_init);
            echo "</script>";

    is what it should be there for you. Does that work?

    Same issue. Let me look into this tomorrow.

    Plugin Author cpres

    (@cpres)

    I’m starting to think this is a file encoding issue due to saving the file from a different IDE. The code of course shouldn’t have been that fragile so…my bad

    Plugin Author cpres

    (@cpres)

    This fix has been committed for 2.2.1! thanks for informing me!

    Version 2.2.1 still does not fix the “parse error” problem with PHP 5.3+
    The problem is located at line 74 of file slideshow-satellite-plugin.php
    Please replace:
    </style> <?
    with
    </style> <?php
    and everything is back to normal.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Plugin could not be activated because it triggered a fatal error.’ is closed to new replies.