Page MenuHomePhabricator

Unbeta Feedback on Phame
Closed, ResolvedPublic

Description

  • I thought there were still some some "Custom Domain" issues that I'd like to fix before unbeta'ing but I need to dig those up.) (T4936 ?)
  • Links to objects (like T123) on blogs on custom domains do not work until T6299 is resolved.
  • Custom domains should have a way to specify protocols (HTTP vs HTTPS).

Handled:

  • 404 handler on custom domains requires login, but should just 404.
  • Add ability to archive posts
  • Draft titles can get cut off in the home sidebar (see D15425#177646)
  • A full featured drafts view should be added (see D15425#177646)
  • Fulltext search implementation
  • Sort default home view by first publish date, not creation date, so newly published stuff is at the top instead of lower down (whenever it was first written).
  • Phame blogs with header images throw an exception (roughly "getHeaderImage(): trying to use data but that data was not loaded and attached") when accessed via the Live controller on a custom domain.
  • Custom domains probably need a way to link to an alternate root (e.g., the main company site).

Details

Commits
D16173 / rPaf5001db642d: Allow PhameBlog to take a full URI instead of just a domain name
D16150 / rP967945e4b4e9: Add ability to link back to parent site in external phame blogs
D16148 / rPf763c314e107: Fix external blog images
D16126 / rP4e14b3f3a507: Use modern layout in Phame Blog management
D16125 / rPb94b16df4900: Allow Phame Posts to be ordered by datePublished
D16120 / rP695f0b09b237: Add supportsSearch to Phame Blog/Post
D16116 / rPbce44c8b02b3: Add PhamePost to full text search
D16119 / rPcfa73eb54408: Make PhameBlog full text searchable
D16107 / rP63d413e20136: Don't truncate blogs or posts in Phame sidebar
D16104 / rP72c57d36a30c: Ability to archive Phame Posts
D16010 / rP03e54afc146c: Give Phame blogs an explicit 404 controller
D14656 / rP39903769f063: Fix Phame Post creation time
D14713 / rPdafdd39ba9e8: Clean up URIs in Phame
D14903 / rPabd60eeee0e6: Rough data fetch for previous/next posts on a blog
D14902 / rPe0a97c88dbec: Provide phame.post.edit Conduit API method
D14901 / rP00f1389f72db: Add phame.post.search Conduit API endpoint
D14900 / rPb74f93f229d4: Add phame.blog.search Conduit API endpoint
D14899 / rP3335bcbfc9f2: Add a phame.blog.edit Conduit API endpoint
D14898 / rP6cb01374a590: Remove previous-generation Phame Conduit API methods
D14741 / rP20d2652d03c4: Mark external -> external redirects in Phame to canonicalize URIs as "external"
D14740 / rP8a906b0e18a7: Remove skins from Phame
D14723 / rP23bb1eeec0e2: Minor tweaks to PhamePostView
D14714 / rPd3452967e043: Remove phame.skins config option
D14709 / rPe275964f4379: Tidy up PhameBlogManage
D14698 / rPafacdbd814cc: Use AphrontDialog for New/Move Phame Posts
D14676 / rP0ce373a01267: Add subscriber mailtag to blog posts
D14677 / rP6e7940cea2c7: Minor Phame polish
D14671 / rPcf6c3fb41a16: Minor updates to PhameBlogSearch
D14660 / rP74882503aaf9: Spiffy up PhamePostView
D14658 / rP7ce2ad294ff8: Separate out PhameDescriptionView
D14657 / rP905d0f43b10c: Misc Phame Updates

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Ah, sure -- sorting the home page by first-publish date makes instead of creation date sense to me.

epriestley updated the task description. (Show Details)Feb 11 2016, 1:48 PM
rphl removed a subscriber: rphl.Feb 12 2016, 9:07 AM
beber added a subscriber: beber.Feb 15 2016, 12:50 AM
In T9897#155081, @chad wrote:

If they can post to the blog, they can read the draft.

My thinking is along the lines of the network operations team is writing a post that a data center will be unavailable on Tuesday and would like some people who are not networking experts to read it (to confirm that the salient fact that applications in the datacenter will be unavailable isn't lost to arcane BGB wizard jargon). It feels sort of awkward to give unrelated people write access just so they can read. I think this fits with the "internal announcements" theme but unless your internal company is huge is probably "nice to have".

chad added a comment.Feb 19 2016, 9:11 PM

My expectation is that if your company has significant process around posting a blog post, they likely are using a different product to manage that (ie, Google Docs). Wordpress doesn't even offer such a feature without a third party plugin.

chad added a comment.Feb 19 2016, 9:25 PM

There may be "document review" built into Phriction at some point. I don't know if maybe we could generalize that to Legalpad and Phame as well.

A possible workaround is to create two blogs (review, production), and use "Move Post" as a "Super Publish".

Although I guess that sort of doesn't really solve many/any problems. But we could embrace that by allowing a blog to be "unlisted" or something, maybe.

Couple of thoughts, not necessarily unbeta stuff:

  • Now that I'm actually using Phame, figuring out some kind of monogram/remarkup thing for it would be sort of nice so it's a little easier to reference a post in tasks/wikis/etc (my use case is that when I write a "Development Log" or "High Horse Soapbox" post, I'm often providing context for things elsewhere, and want to link it from that place/places). I don't think actual POST123 monograms are great for this, but this motivate:

Related, now that I've written a few internal posts I found myself wanting to link to a previous post in a way that would generate a backlink/mention.

Since T10477 was closed as a duplicate of this task but ctrl+f "delete" turns up nothing I guess I'll repost my comment here: I can't find any way to delete a Phame draft or post. This means that exploration by new users is irreversible and my list of draft grows monotonically and becomes progressively more cluttered over time. Because the URLs are prettified, it's also not clear how to use bin/remove to delete a post object or what the object ID might be.

a) How do I figure out the object ID for a phame post?
b) Please consider adding a delete button as part of unbetaing Phame.

chad added a comment.Feb 29 2016, 9:22 PM

> This means that exploration by new users is irreversible and my list of draft grows monotonically and becomes progressively more cluttered over time.

This sounds like the root issue to me. How is Phame set up on your server and why are users creating random posts everywhere? We're not likely to add a delete option since it's inconsistent with Phabricator's policies.

I've fixed this but someone still left a draft on my internal blog that I can't now delete. I considered just writing over it but it preserves their username on the authorship.

maxhodak added a comment.EditedFeb 29 2016, 9:25 PM

Also, Phame appears to sort posts by descending post ID number so even if I write over an old draft with new content it's going to sort way down. This is more part of my usual workflow: write some content, decide against it being a good idea, can't delete, ???, write over?

chad added a comment.Feb 29 2016, 9:26 PM

We'll probably look at adding an "Archive" state in addition to Published and Unpublished. That would remove it from most views.

chad updated the task description. (Show Details)Feb 29 2016, 9:27 PM

Nevermind about that last point, I see

Sort default home view by first publish date, not creation date, so newly published stuff is at the top instead of lower down (whenever it was first written).

in the description that would address this, yes.

maxhodak removed a subscriber: maxhodak.Mar 7 2016, 4:38 PM
chad updated the task description. (Show Details)Mar 7 2016, 6:34 PM
chad updated the task description. (Show Details)
chad updated the task description. (Show Details)

The ordering of blogs on the right /phame is (I think after looking at it) creation date. I'm not sure that is the more useful than just lexographical(?) and feels bit implementation detail-y.

In T9897#161715, @chad wrote:

That's because macros are restricted to logged in users there: https://phabricator.wikimedia.org/applications/view/PhabricatorMacroApplication/ As logged in user everything is ok.

epriestley updated the task description. (Show Details)Jun 2 2016, 2:46 PM
chad updated the task description. (Show Details)Jun 13 2016, 5:34 PM
chad updated the task description. (Show Details)Jun 13 2016, 6:20 PM
chad updated the task description. (Show Details)
chad updated the task description. (Show Details)Jun 13 2016, 7:08 PM
rphl added a comment.Jun 14 2016, 12:22 AM

any plans/chance to implement search if you unbeta phame? T6383?

we have 5 blogs with many posts. it would be great if we could search for posts :-)

chad updated the task description. (Show Details)Jun 14 2016, 12:35 AM
chad updated the task description. (Show Details)

I can probably copy-pasta that feature.

chad updated the task description. (Show Details)Jun 15 2016, 5:45 PM
chad updated the task description. (Show Details)Jun 15 2016, 7:48 PM
epriestley updated the task description. (Show Details)Jun 19 2016, 2:24 PM
epriestley updated the task description. (Show Details)
chad updated the task description. (Show Details)Jun 19 2016, 3:07 PM
chad added a comment.Jun 19 2016, 4:39 PM

@epriestley Any of what's left reasonable for me to accomplish? Or are they all super technical?

The major custom domain issue is that there's no way to specify a protocol (HTTP vs HTTPS) or port (although this is less important). In particular, http://blog.phacility.com/ works and is the default live URI for that blog, but we would prefer https://blog.phacility.com/ to be the default URI and for http to redirect to https.

We should probably change the behavior of "Custom Domain" so that there are two fields stored in the database:

  • domainFullURI or whatever (a new field): stores a value like https://blog.example.com:12345/.
  • domain (existing field): continues storing the actual host with no protocol or port.

We need to keep the domain field because blogs should have unique domains. In particular, these should always be the same blog:

http://blog.example.com/
http://blog.example.com:80/
https://blog.example.com/
https://blog.example.com:443/

If we don't require this, we run into various silly/confusing problems:

  • Users would reasonably expect all of these URIs to lead to the same blog.
  • We can't necessarily distinguish between a request to blog.exmaple.com and blog.example.com:80 anyway.
  • There are sort-of attacks if users are allowed to create blogs, where an attacker can try to create a blog with a domain like https://blog.phacility.com:443/ and put evil content on it that looks like it's official.

So the workflow would look like this:

  • User enters full URI (protocol + domain + optional port), like https://blog.phacility.com/ (UI is basically the same as it is now -- they still enter one value, it just has protocol + port now).
  • Error if they don't enter "http" or "https".
  • Error if they have a username, password, path, query string, or anchor/fragment in the URI.
  • Write the full value to domainFullURI.
  • Extract just the host, write that to domain (this will throw on duplicates since there's a unique key).

Then:

  • PhameBlog->getExternalLiveURI() should respect the specified protocol.
  • PhameLiveController->setupLiveEnvironment() should redirect from HTTP to HTTPS, or vice versa, if we're on the wrong one.

This is probably reasonably straightforward to implement, but may be a big pain to test locally. You can test custom domains like this:

  • Add local.blog.phacility.com to your /etc/hosts file.
  • Create a blog on local.phacility.com with that custom domain.

Testing HTTPS is trickier, although it's probably good enough to see that URIs and redirects get generated correctly even if https://local.blog.phacility.com/ doesn't actually work.

Custom domains probably need a way to link to an alternate root (e.g., the main company site).

Oh, and this is probably pretty straightforward, I'm just not sure what we want to do about it. Issue is that there's no link to get back to phacility.com from http://blog.phacility.com.

We could just add a couple of fields like "Parent Site Name" and "Parent Site URI" or something, which turn into a "Phacility" crumb at root level.

chad updated the task description. (Show Details)Jun 20 2016, 9:37 PM
chad added a comment.Jun 23 2016, 7:31 PM

User enters full URI (protocol + domain + optional port), like https://blog.phacility.com/ (UI is basically the same as it is now -- they still enter one value, it just has protocol + port now).

For this, should I write a migration script to just add http:// for people who have already configured it?

Yeah, I think you can just do a SQL migration like:

UPDATE {$NAMESPACE}_blog.blog
  SET fullWhateverWhatever = CONCAT('http://', oldDomainColumn, '/')
  WHERE oldDomainColumn IS NOT NULL;
chad closed this task as Resolved.Jun 24 2016, 9:24 PM

Closing as Resolved in general. T6299 and T4936 are already in the system separately.

FYI, there is a report about a regression from multiple users at WMFs-Phabricator: https://phabricator.wikimedia.org/T144338

Please follow the instructions in Contributing Bug Reports if you'd like to report a bug. Thanks!