@Mark - I have parsoid set up as a service, but if I stop that service and start it the manual way (node /etc/parsoid/api/server.js), then I see the following two lines when I click "Edit" and VE hangs:
[info][wiki/Test2?oldid=74774] started parsing [info][wiki/Test2?oldid=74774] completed parsing in 4210 ms
I don't think composer update is required for VE, but I can try that when I get some more time.
@Florian - I'm still getting intermittent "success" for VE to load the edit view. Please see https://github.com/enterprisemediawiki/Meza1/issues/87 for two screenshots with the network tab open in the console tools.
I did a quick cmd-F to search for "fatal" or "MWException" and didn't see anything.
Strange side note - it seems the more I test this, the more chance I have at a successful VE load ... but that doesn't tell me why this is happening.
Just for reference, here is the script I use to install VE on top of a working 1.25 MW VM:
echo "******* Downloading node.js *******" cd ~/sources
# Download, compile, and install node wget https://nodejs.org/dist/v0.12.5/node-v0.12.5.tar.gz tar zxvf node-v0.12.5.tar.gz cd node-v0.12.5 ./configure echo "******* Compiling node.js *******" make echo "******* Installing node.js *******" make install
# Download and install parsoid echo "******* Downloading parsoid *******" cd /etc git clone https://gerrit.wikimedia.org/r/p/mediawiki/services/parsoid cd parsoid echo "******* Installing parsoid *******" npm install
echo "******* Testing parsoid *******" npm test #optional?
# Configure parsoid for wiki use # localsettings for parsoid echo "******* Downloading configuration files *******" cd ~/sources/meza1/client_files
# Copy Parsoid settings from Meza to Parsoid install cp ./localsettings.js /etc/parsoid/api/localsettings.js # Add VE and UniversalLanguageSelector to ExtensionSettings cat ./ExtensionSettingsVE.php >> /var/www/meza1/htdocs/wiki/ExtensionSettings.php # Add VE settings to LocalSettings.php cat ./LocalSettingsVE.php >> /var/www/meza1/htdocs/wiki/LocalSettings.php
# Run updateExtensions to install UniversalLanguageSelector and VisualEditor echo "******* Installing extensions *******" php /var/www/meza1/htdocs/wiki/extensions/ExtensionLoader/updateExtensions.php
echo "******* Installing VE *******" cd /var/www/meza1/htdocs/wiki/extensions/VisualEditor git submodule update --init
echo "******* Running update.php to update database as required *******" cd /var/www/meza1/htdocs/wiki/maintenance php update.php --quick
# Create parsoid user to run parsoid node server cd /etc/parsoid # @issue#48: is this necessary? useradd parsoid
# Grant parsoid user ownership of /opt/services/parsoid chown parsoid:parsoid /etc/parsoid -R
# Create service script echo "******* Creating parsoid service *******" cd ~/sources/meza1/client_files cp ./initd_parsoid.sh /etc/init.d/parsoid chmod 755 /etc/init.d/parsoid chkconfig --add /etc/init.d/parsoid
# Start parsoid service echo "******* Starting parsoid server *******" #chkconfig parsoid on # @todo: not required? service parsoid start echo "******* Please test VE in your wiki *******"
The ExtensionSettings.php is just telling our script to load version 1.25 of UniversalLanguageSelector and VE.
The following is appended to LocalSettings.php:
// Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1;
// Don't allow users to disable it $wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features #$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
// URL to the Parsoid instance // MUST NOT end in a slash due to Parsoid bug // Use port 8142 if you use the Debian package $wgVisualEditorParsoidURL = 'http://127.0.0.1:8000';
// Interwiki prefix to pass to the Parsoid instance // Parsoid will be called as $url/$prefix/$pagename $wgVisualEditorParsoidPrefix = 'wiki';
Finally, the following is my init.d script for the parsoid service:
#!/bin/sh
# # chkconfig: 35 99 99 # description: Node.js /etc/parsoid/api/server.js #
# provides echo_success and echo_failure functions (amongst others) . /etc/rc.d/init.d/functions
USER="parsoid"
DAEMON="/usr/local/bin/node" ROOT_DIR="/etc/parsoid/api"
SERVER="$ROOT_DIR/server.js" LOG_FILE="$ROOT_DIR/server.js.log"
LOCK_FILE="/var/lock/subsys/node-server"
get_parsoid_process_id() { echo `ps -aefw | grep "$DAEMON $SERVER" | grep -v " grep " | awk '{print $2}'` } parsoid_start_echo_success() { # Wait 10 seconds since paroid takes some time to start and we don't have a # good method to be told when it's up sleep 10 echo_success # normal echo_success function } do_start() { pid=$(get_parsoid_process_id)
# if no parsoid process exists already if [ -z "$pid" ]; then
echo -n $"Starting $SERVER: "
# Use "nohup" to prevent hang-up. Thanks to: # http://stackoverflow.com/questions/5818202/how-to-run-node-js-app-forever-wh... runuser -l "$USER" -c "nohup $DAEMON $SERVER >> $LOG_FILE 2>&1 &" && parsoid_start_echo_success || echo_failure echo "" # newline after success/failure RETVAL=$? else echo "Parsoid already running with process ID = $pid" RETVAL=1 fi } do_stop() { echo -n $"Stopping $SERVER: " # pid=`ps -aefw | grep "$DAEMON $SERVER" | grep -v " grep " | awk '{print $2}'` pid=$(get_parsoid_process_id) kill -9 $pid > /dev/null 2>&1 && echo_success || echo_failure echo "" # newline after success/failure RETVAL=$? }
case "$1" in start) do_start ;; stop) do_stop ;; restart) do_stop do_start ;; *) echo "Usage: $0 {start|stop|restart}" RETVAL=1 esac
exit $RETVAL
On Sun, Jul 12, 2015 at 12:44 PM, Florian Schmidt < florian.schmidt.welzow@t-online.de> wrote:
Hi,
it would be interesting to look in the data returned from resourceloader (in Google Chrome: Open the console and switch to the network tab, then click "Edit" to load VisualEditor and go through all added lines). Maybe there is a fatal error or a MWException somewhere, which should be mentioned in a comment on top of a delivered response.
Best, Florian
-----Ursprüngliche Nachricht----- Von: wikitech-l-bounces@lists.wikimedia.org [mailto: wikitech-l-bounces@lists.wikimedia.org] Im Auftrag von Daren Welsh Gesendet: Sonntag, 12. Juli 2015 02:07 An: Wikimedia developers Betreff: Re: [Wikitech-l] VE stopped working on 1.25 after import & update of wiki db (1.23->1.25)
Yes, I run 'git submodule update --init' after checking out REL1_25. Just to reiterate, I check out the REL1_25 branch of VisualEditor and UniversalLanguageSelector, but I don't see a way to check out that branch for Parsoid.
There's nothing in the console.
Oddly, I was able to make one edit to a very simple page with one sentence as an anon user. After logging in, it was back to hanging every time. I tried logging out and cannot get it to work again. I'm not sure why that one time worked.
On Fri, Jul 10, 2015 at 3:57 PM, Alex Monk krenair@gmail.com wrote:
Do you run `git submodule update --init` after checking out REL1_25 of
VE?
What is in your browser's developer console when you try to load VE?
On 10 July 2015 at 21:51, Daren Welsh darenwelsh@gmail.com wrote:
We have an existing wiki using MW 1.23. We are working on a build script
to
generate a wiki using MW 1.25. Eventually the script will also automate
the
database import and update, but for now I'm still learning the steps.
I built a VM with 1.25 and VE using some scripts that we are
building[1].
VE seemed to be happily working. Then I imported our 1.23 SQL database
and
files (/images). I ran update.php and runJobs.php. Now it seems VE hangs
at
about the 75% point of the blue "progress bar" after clicking "Edit".
Note
that I am still able to edit source.
I know this is not enough to get a full answer, but I'm hoping you can
help
me find some more resources to try. For example, are there any
significant
changes between the REL1_25 branch of Parsoid and HEAD? I see the branch
on
Gerrit, but I couldn't see that branch in git for a checkout.
Thanks,
Daren
[1] https://github.com/enterprisemediawiki/Meza1
-- __________________ http://enterprisemediawiki.org http://mixcloud.com/darenwelsh http://www.beatportfolio.com _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
-- __________________ http://enterprisemediawiki.org http://mixcloud.com/darenwelsh http://www.beatportfolio.com _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l