Extension talk:PieceOfCode
Security
editCould this pose a security risk as they can specify a malicious URL or would it only show the harmless source code? --72.211.252.69 23:06, 3 September 2011 (UTC)
Does it works with MW 1.22
editHi! I installed the extension, but when I open any wiki webpage, there is only blank page on browser.
How can I debug what is happening ?
// the directory case is correct (not camelcase) #require_once("$IP/extensions/pieceofcode-dr/PieceOfCode-dr.php");
- To debug you should enable php to prompt messages or read its logs. But I already gave it a try and I found a few issues with deprecated functions in MW1.22 and some globals. I've just generated a version 0.2 with bugfixes and it's available in section Downloads. I hope it helps you and thanks for trying this extension. --Daemonraco (talk) 00:36, 28 January 2014 (UTC)
DR_PieceOfCode Error: Unable to retrieve file information
editHi!
The following message is shown when I try to use the extension:
"DR_PieceOfCode Error: Unable to retrieve file information (MyProject>/PROD/trunk/...".
I think I am missing something from configuration. I have verified the following itens:
- I can access with a browser, the svn file with a URL like:
http://10.10.10.1/svn/PROD/trunk/.../XXX.java
- The previous URL asks for username/password. That credentials are the same as configured on LocalSettings.
- The credentials are readonly.
- On LocalSettings I configured MyProject as "http://10.10.10.1/svn" (without the end slash)
- The wiki page is configured with:
connection=MyProject file=/PROD/trunk/.../XXX.java
- I have svn on path "/usr/bin/svn"
Is there anything more I can check for mistakes ?
Just a few checks
edit- Based on your comments, I guess you are using a *nix system. if you run "/usr/bin/svn info http://10.10.10.1/svn/PROD/trunk", does it bring you information or an error? (should be information).
- Remember to run this using you web user. A default ubuntu usually uses 'www-data'.
- I found some troubles with $wgEnableUploads related with this extension, so I recommend you set to "true" this variable $wgPieceOfCodeConfig["enableuploads"] on your LocalSetting.php
- It should be after the require_once sentence for this extension.
- $wgUploadDirectory seems to have a similar issue, so I recommend to use something like this:
- Based on your comments, I guess you are using a *nix system. if you run "/usr/bin/svn info http://10.10.10.1/svn/PROD/trunk", does it bring you information or an error? (should be information).
$wgPieceOfCodeConfig["uploaddirectory"] = "/<path_of_your_wiki>/images/PieceOfCode";
- Make sure this directory exists.
- Also make sure the web user is allow to write in there. 'chmod 0777' is enough, but don't forget about security.
- There's also a security check on PieceOfCode which requires upload permission for the user been used to <pieceofcode> tag.
- This extension finally uses a passthru command, check if this is not disable by you apache configuration (if you use apache).
- At this point, if it works and it looks weird, just remember to activate the extension SyntaxHighlight_GeSHi.
- Daemonraco (talk) 00:59, 12 February 2014 (UTC)
Bingo! It works !!! =
edit- Done all items on your checklist.
- Also, added to file "/var/www/.subversion/servers" the following lines:
[global] store-plaintext-passwords=yes
Google Code Shutting Down
editHello, As you are likely aware, Google is shutting down their Google Code service in January of 2016. This extension appears to house its code with Google Code and is at risk to creating broken links and confusion of users in the near future.
I’m helping to let folks know about this coming update and provide some helpful links to make this migration easy. I hope you’ll take a moment and migrate your extension to a new hosting solution.
For extensions that have a compatible license, you can request developer access to the MediaWiki source repositories for extensions and get a new repository created for you. Alternatively, you may also export your code to other popular repositories such as Github and Bitbucket. Google has provided tools to help with this migration.