Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Nemopress

    (@nemopress)

    Sorry for the delay. What I did was what I explained above, altough I’m not entirely sure that those other users are having this exact problem.

    I checked what the error was from the browser console, saw that there was a parsing error on that line:

    C:\xampp\htdocs\wordpress/wp-content/plugins/leaguemanager

    And proceded simply to replace the echo that generates it, I mentioned the exact line before, with a:

    C:/xampp/htdocs/wordpress/wp-content/plugins/leaguemanager

    Since I don’t have a general exposure to the codebase I’m still not entirely sure why the software would expose such absolute paths to the page, even with an OS filesystem reference, but it was as simple as modifying backslashes to avoid the automatic string escapes.

    A long-term solution, which I guess should be preferrable, would be assuring that, when on Windows, the first part of the path gets properly escaped or that at least the slashes are replaced when necessary.

    I hope I made myself sufficiently clear or I can explain it again.

    Thread Starter Nemopress

    (@nemopress)

    Thanks for the help.
    I don’t want to waste your time though and I think that I found where the problems lies.

    It might be a bug depending on how you look at it but it’s most likely a very niche case. Anyway, the problem was on how the constants are defined in the defineConstants() function and how xampp translates them, or more correctly Windows. More precisely, what happens is that this bit:
    pluginPath: "<?php echo LEAGUEMANAGER_PATH; ?>"

    translates to something like this:

    C:\xampp\htdocs\wordpress/wp-content/plugins/leaguemanager

    and the parser obviously chokes as the the backslashes aren’t escaped.
    I have modified the function to output the proper string and it seems to work just fine.
    It’s something of a platform problem really. 🙂

    Thread Starter Nemopress

    (@nemopress)

    I’ve got the 3.8.8.1 one. I do have ProjectManager installed but I’m pretty sure that the I had the error even before.

    I’m fairly proficient with other languages but I haven’t touched PHP in a long time and wouldn’t want to mess things up. What I can gather from a superficial look is that it’s trying to slice or lookup $field which isn’t an array in that particular case and choking up on that.

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