Entry tags:
Question thread #58
It's time for another question thread!
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
no subject
Background. I'm writing a small browser script to enable the "Repost" functionality, similar to what the LJ has.
Since this uses no LJ API, I'm solely relying on rendered HTML pages for DW posts.
Problem. I'm having trouble detecting cut-tag markers, when my script is run on the post page (it works fine in journal entries page). Here's the difference:
In Journal entries page it looks like: On a page for specific entry: Most obviously, in 2nd case I can't determine where the cut ends.
Question. Is there any way to work this around? What if the DW engine were placed some named anchor element at the cut end?
no subject
no subject
Which I may end up doing anyway because this thread made me go 'oh, posts pulled via the API should probably also contain information about where cut start and end too'
no subject
And as a result I cannot log into the system account on the site at all with either password. I checked every dw_dev community I could find and consulted Google and couldn't find any answers. I hope someone here can help me because I've been trying to figure this out for two days straight. I'm relatively new to dev work so it's probably something really silly/minor but I cannot for the life of me figure it out on my own. Help? :(
no subject
This looks normal to me. At a guess, you may have mistyped the password either when trying to log in as system or when entering it at the bin/upgrading/make_system.pl prompt. If you run bin/upgrading/make_system.pl again, you should be able to copy the password as you enter it, then paste it when logging in using your web browser. This should eliminate all mistype problems. If you still can't log in, come back to us and we'll dig in deeper.
Incidentally, you should not run as root at this stage, but as an unprivileged user of your choice. This is explained in http://wiki.dreamwidth.net/wiki/index.php/Dreamwidth_Scratch_Installation#Setting_up_the_DW_user_account .
no subject
no subject
At the shell prompt, type: You should get some verbiage including the words "Welcome to the MySQL monitor.", ending in a "mysql>" command prompt. At the "mysql>" prompt, type: Paste the output of that command in a comment. Then, type to return to the shell prompt.
no subject
no subject
no subject
no subject
no subject
no subject
no subject
no subject
OK, so it looks like you have a healthy database, as far as these 3 tables are concerned at least. The next step is to try figuring out where in the Dreamwidth code the password is getting corrupted, since it looks like it's not corrupted in the database. This will require running a modified version of make_system.pl. Are you familiar enough with git to juggle different versions of a file? (It's OK if you're not. I just don't want to talk down to you if you already know what you're doing.)
no subject
no subject
no subject
no subject
no subject
no subject
Step 1: update your installation as described in http://wiki.dreamwidth.net/wiki/index.php/Dev_Maintenance#Updating_the_Dreamwidth_code_on_your_Dreamhack , taking good note of http://wiki.dreamwidth.net/wiki/index.php/Dev_Maintenance#Additional_Information_for_Non-Dreamhack_Users.
Step 2: Create a branch to keep the modifications you'll make in step 3 away from the main development effort:
Step 3: Go to https://pastebin.com/raw/DwHfxPek and copy-paste the text into $LJHOME/bin/upgrading/make_system.pl, replacing the existing content. (Specifics depend on your preferred text editor and terminal emulation.)
Step 4: Commit yoour changes to the branch using:
Step 5: Run the modified $LJHOME/bin/upgrading/make_system.pl and paste the output in a comment.
no subject
I'm not really sure what to do here.
no subject
no subject
no subject
Step a: back up your DW directory. That way, we can return to a known point if something goes wrong(er).
Step b: try repairing the damage.
Step c: retrieve and commit the modified file. (Watch out for wrapped lines in the first command below.)
Step d: run the modified file and paste the output in a comment.
no subject
edit: I FORGOT TO WHITE OUT MY PASSWORD IN THE LAST COMMENT!! Eek. Will change it later, lol.
no subject
no subject
The third step doesn't look like it did anything, sadly.
no subject
no subject
no subject
no subject
no subject
no subject
no subject
no subject
no subject
no subject
ETA: filed bug https://github.com/dreamwidth/dw-free/issues/2248