Tag Archives: tips

Webdev Tip: ALWAYS Put the Record ID *in* the Edit Form

I started out this morning happy with my web host. They’d sent me an alert about disk usage that allowed me to catch an error that would have filled up all the available space on my VPS and taken down this site and several others, and I was able to fix it before that happened. That changed as I discovered what had actually set it up, as revealed by another, more pressing issue.

Background

A few months ago, my VPS did lock up, because I’d set up backups on a new site and forgot to add a cleanup script. Tech support brought the server back online, I cleared out the backups, and I copied the script over from this site.

But this site’s cleanup script stopped running, and it reached 90% usage. The script was there, but the cron job was somehow pointing to the other script. I figured I must have messed it up at the time, made sure it was correct now, and moved on.

Discovery

Later this afternoon, though, I discovered that a test blog I set up last week was pointing to the wrong site. That seemed really weird. I looked in the control panel and it was very neatly pointing to the other site’s folder. How does that happen?

Then I remembered: A few days ago, I’d reconfigured several sites to upgrade them to PHP 7.2. I’d opened them in multiple tabs to I could get them all at once. And I had this sinking feeling.

Sure enough: DreamHost’s control panel doesn’t put the form state in the page. As far as I can tell, the ID of the record you’re editing is stored in the session somewhere, which is fine if you only ever have one page open at a time, but if you open two pages, it gets confused.

That’s what probably happened a few days ago: I opened two forms, saved them both, and the settings for one site got written to the other. And it’s probably what happened a few months back with the cron jobs: I opened one to edit, the other for reference, and it overwrote the wrong one.

As near as I can tell it’s just the one site that got messed up, which is a relief. Even better that it’s the test site and not, say, this one. But I’m still waiting for the fixed config change to take effect.

Lesson

Always, always put the record ID for an edit form in the form. People will open multiple records in different tabs or windows, to compare them or just to speed up their workflow.

If you store it in session, or in a cookie, or anywhere else, you run a good chance of saving the data into the wrong record.

Tips: Keeping Connected at Comic-Con

Spider-Man answers his cell phoneComic book convention season has begun, and I’ve updated my Tips for Comic-Con with a bunch of ideas for keeping connected during and after the con. Smartphones, live-blogging and social networking have changed expectations and added a new set of challenges to the crowded event.

Getting Online

  • Wi-Fi is available in some parts of the convention center (which ones varies year to year). It’s frequently jammed, though.
  • If you see both free wifi and a paid hotspot on a service you already subscribe to, go with the paid service. It’ll be less crowded.
  • If you need to get online but can’t connect on the convention floor, hit a nearby hotel lobby.
  • Hotel internet access is often faster early in the morning than late at night, because no one wants to get up early to go online. That’s the time to upload your photos.
  • Cell reception can vary a lot by carrier in some convention centers, especially those with basement exhibit halls (Long Beach, I’m looking at you.)

Social Networking

  • If you want to update multiple social networks from the con, don’t spend time posting to all of them on a busy connection. Pick one and have it sync to the others using built-in connectors or IFTTT.
  • Tag your photos by convention+year and topic. Examples: Comic-Con 2013, #SanDiego, #cosplay, #SDCC, #StarWars.
  • Look for photo pools/groups dedicated to the convention (ex: SDCC on Flickr) or topics.
  • If you aren’t posting photos instantly but do want to share them, post them nightly or as soon as you get home. Interest drops off quickly after the con is over.

Hardware

  • Set your phone to vibrate and text instead of calling. You won’t be able to hear it ring or carry on a conversation on the main floor. Even then, you’ll want to check frequently for messages you’ve missed.
  • Bring a spare battery for your camera so you can swap it out in the middle of the day.
  • Make sure you bring chargers and data cables for ALL your electronics. Charge your phone every night, even if you don’t think you need to.
  • If you heavily use a power-hungry phone, carry a battery extender so you can recharge without finding a socket.
  • Save battery by turning off or slowing down notifications that you won’t be keeping up with during the con. If you only plan to check (for instance) Facebook in lines and after hours, you don’t need your phone checking every 5 minutes while you’re on the floor.

Head over to Speed Force for the full list of Comic-Con tips!

Comic-Con Hotel Deadline & Second Chances

Today is the last day for people to cancel their hotel reservations at Comic-Con International for a full refund. Starting Saturday, they’ll keep a $75 cancellation fee.

So what’s the good news?

If you couldn’t get a room in March, and haven’t found alternative housing for the convention, this may be your second chance!

Even if there were fewer “just in case” reservations this year, there are always at least some people whose plans just fall through. Someone gets sick, their financial status changes, they were counting on a raise that didn’t happen, a cousin schedules a wedding for that weekend, etc. Rooms should be opening up over the next few days as people take their last chance to cancel without penalty.

The question is: what happens to them?

The old reservation process worked like a crowded store, where everyone kept trying to pick a room until they ran out. So when rooms freed up, they were made available to whoever happened to be checking up on the system.

This year, though, was like a massive take-a-number system, with Travel Planners assigning rooms to people in order (even though it’s not clear exactly what order it was). They did cap the line, but there were an awful lot of people who got requests in but no rooms, and ended up on a waiting list. A representative confirmed by email that they will contact people as rooms free up.*

So, what we should see in the next few days is Travel Planners offering rooms to the early part of the waiting list. Edit: Maybe not – see the comments.

It’s a safe bet that some people on the list have already secured a room through other channels, and no doubt some of them will want to stick with their alternate lodging (especially if their alternate hotel is across the street, and Travel Planners hands them something ten miles away). That will probably trigger a second round of free rooms next week.

No doubt the process will repeat itself on June 18, when the rest of the deposit becomes non-refundable.

Of course, it all depends on just how many people cancel their reservations to start with. I doubt anyone outside of the travel agency (and maybe CCI) has solid numbers of just how many con-goers are stuck in limbo.

*The way they put it was that they were trying “to identify any rooms already committed that might not be ultimately utilized.” Gotta love corporate-speak.

How to Get a Hotel for Comic-Con

San Diego Convention Center and HiltonPlanning to go to Comic-Con International, but couldn’t get a hotel room during the reservation lottery? There’s no magic bullet or secret code, but here are some things you can do to find a place to stay during the con:

ADDED: Call customer service if you placed a request but haven’t heard back from them. There may have been a problem with the email (at their end, at your ISP, or anywhere in between), or there may have been an issue with the reservation that prevented them from processing it or sending the confirmation. But do it soon, so you don’t miss the deadline to secure it with a deposit.

Some rooms may open up when the deposit deadline passes. Maybe. This is probably only an option if you submitted a reservation request but didn’t get a room, and it assumes that (a) not everyone will manage to make a deposit in time and (b) Travel Planners will move on to the wait list with the rooms that free up. I wouldn’t rely on this one.

Book directly, but be prepared to spend more. And be prepared to try a lot of hotels before you find one with available rooms, or else go through a travel site like Expedia, Travelocity, Priceline or Hotwire.

Look into short-term condo rentals. Hotels aren’t the only way to rent a room. You could make your trip into a week-long vacation!

Find roommates to share the cost of that directly-booked room. Or find roommates who already have a room. A lot of the downtown hotels actually have suites, so you might even have some privacy. (One thing to watch out for, though: hotels will often charge more for extra people.) If you don’t personally know anyone to share a room with, try asking in your online communities.

Stay with friends or relatives in the area. Obviously not an option for everyone, but again, you can check with online friends.

Stay farther out and commute. If all you need is a place to sleep and shower, you don’t have to stay downtown. Mission Valley and Old Town have trolley service straight to the con, and you can get a 4-day trolley pass for $15.

Try again after cancellation deadlines hit. Some rooms will open up after the last day for a full refund, and more open up after the last day for a partial refund. Check the convention website for this year’s dates and how to get in for the resale.

Good luck!

Once you’ve got your lodging situation settled, check out the rest of my Tips for Comic-Con.

The Other 10 Essentials of Comic-Con

You know what to pack on vacation. You know to bring your camera, spare batteries, and a bottle of water. But here are ten things you might not think of that will come in handy at a comic-con.

  1. Medical tape – preventing blisters from costume shoes. (Also, repairs in a pinch)
  2. Extra lanyard for your camera
  3. Umbrella for outdoor lines
  4. Costume-appropriate bag
  5. Insoles – you’ll be walking a LOT
  6. Burt’s Bees Res-Q Ointment for sunburn in case your sunscreen wears off or otherwise fails
  7. Safety pins
  8. Reliable writing surface (in case you have paper but not a notebook)
  9. Napkins or paper towels (especially if you’re bringing your own food)
  10. Extra shirt to go over tank tops to prevent sunburn or backpack friction

Read more Tips for Comic-Con.