A bomb and a reset

Posted on

So I kind of abandoned this blog for awhile. Moved it a few times folder-wise. Didn’t bother to update it in any way. Pretty much haven’t touched it since early 2016. Stuff happened. I got lazy. Focused on web dev for a while (not PHP or wordpress).

I don’t even know how I managed to kill it. But it was 2019 and I haven’t updated wordpress. Meh, whatever. But it was acting weird when I was trying to change themes. And then it locked me out with a 500 server error. No explanation. Can’t find logs. Can’t view blog past the first page. No access to wp-admin. Tried everything. Reinstall wordpress. Reinstall wordpress with a older version. No dice. Played around with htcaccess so much. Nope. Nope Nope.

So I just deleted the whole thing in the folder. Made and remade the subdomain. Backed up the database. Fresh install of wordpress, database, everything. Just used Fantastico because I know it’ll work. (Yes, I did try a manual install and connecting my current database….no dice)

I’m sure there’s a way to import .sql with the table prefix changed but I didn’t know how so I just imported my old database tables into my new one. I changed the posts by renaming. Yay! It works.

But I try to change the categories/tags tables (_terms). It doesn’t work. Doesn’t show. Doesn’t work to make a new one. I can see that it was actually making new terms, I just couldn’t see it on the front end. I thought maybe it’s an issue of writing to a different table somehow via id. But I could not find how to get that far into the source.

I was ready to bomb it again when I finally accessed my error logs. It turns out I didn’t rename one of my term tables.

I am still not sure where the term to post relations went. You’ll think that one of the tables will store it and it will be preserved but ???? or at least one of them is the many-to-many but I can’t find it and it seemed to have disappeared on the front end for sure.

I later found in in wpprefix_term_relationships.

The lesson here is read the damn error logs. And figure out the how the database works before trying to do a transplant.

Or use a simpler database schema haha . I don’t know. It’s fine when it’s complicated and you know about it because you made it but it seems less fine when it someone else’s!

Dear Uncooperative CSS Ids

Posted on

Dear #content and #contenttext of my site,

I’m not quite sure why you’re defiant, but I would really appreciate it if you would respond to my @media queries. You’re good on the desktop, you have moved to the appropriate place and  did everything appropriately and for the most part, behaved well for regular use. But that is less so it seems when it comes to the @media queries. Maybe I’ll saying everything wrong, I don’t know.

#contenttext, you are pretty well behaved except when it come to scaling text on mobile devices. Why are you so small in Dolphin HD and Firefox mobile? Why do you refuse nearly all my attempts to make you a bit bigger in mobile. Maybe we can blame the browsers but I don’t understand why you won’t get one little bit bigger, even though I’ve asked you in all sorts of ways with @media queries and in the regular CSS.

But #content please, know that

@media screen and (max-width: 600px){
#content {width:100%, margin: -3em}

means you have to get wilder and decrease the space between you and the viewport edge.  It does not mean that you do nothing. I know you’re ignoring me. I tried all sort of crazy things and you still wouldn’t obey. I even tried changing your background to red with background: red;  in the @media query to see if you will respond to my visually preposterous request and you didn’t do a thing. Not a single, stupid thing! I even tried to turn you into a class and that didn’t do anything! (I decided it wasn’t worth redoing).

The only thing you seem to obey is display: none;. Seriously? The only thing that you will obey is to disappear? That’s not enough.

#contenttext you are not to be ignored either. I guess you will go to whatever position I want you in, more or less but why won’t you do what I meant you to do, which was to control the text? I told you many times and in many whale to make the text bigger, even going as so far to font-size:200%; but did you respond to that @media query? No. Of course not. I resized the window, took a look at my phone in several Andriod-flavoured browsers. Did you make the text bigger? No. I tried px, pt, em, % and a bunch of scaling methods to no avail. Scale text, scale up on mobile!

I know you’re not listening to me. I know because when I try to change your colour in the @media query, you wouldn’t do it either!

I know all can do it. You all listen fine, for the most part, outside the @media query. So what’s the issue? Now okay, maybe I’m doing it all wrong. Maybe I’m not using @media queries right. You’re right that I’m probably abusing it beyond it’s original intentions but so is everyone else.   I understand this is all new and everyone, even you #content and #contenttext is somewhat confused at all this newness. Maybe I just don’t know what I’m doing.  Maybe I’m doing it all wrong.

Maybe all those Android browsers are to blame (I’m glaring at you Mr. Opera mobile…wouldn’t even display my font properly!) although the browser thing probably merits another letter altogether

Still, I really wish you two would be good and listen better, like #navigation. She’s not perfect either (and the slight horizontal scroll drives me crazy but it’s pretty minimal if shouldn’t exist on a widescreen)  but at least she mostly listens…

Sincerely,
Jen

Postscript: I gave up trying to scale up the text and gave up trying to widen the content for mobile devices.  Also, somebody tell me that my code is all wrong. Also this is probably not as funny to someone who doesn’t understand CSS and that media queries thing but whatever.

Also driving me nuts is Android browsers in general but that’s another rant for another time…

Bizarre Google Webfont Glitches in Chrome

Posted on

You’ll think that Google web fonts will work well in Google Chrome. Well, no. And it was WORSE before too!

In <h1> titles, at least with my font  (amaranth) – an ellipses (…) can make it revert to the fallback font.  If you have a comma, then the text on the other side of the comma that is not with the ellipses will display the webfont. Weird eh?

Firstly I don’t understand what’s with the “read more” link and why it seems to be doing its own font thing even though I’ve told it not to. (I’ll let it go for now).

Some fonts have weird issues

  • Arvo displays oddly on my WP site on chrome (it seems to insert 9s that overlap).
  • Alegreya displays oddly with italics in body text (and yes, that font does have a italic), making a huge space within the entire line, some sort parts reverting to the fallback font

This issues don’t seem to be in Firefox. (Or even, gasp, IE!) So it’s a chrome issue.

It’s still an improvement to about a year ago when google web fonts wouldn’t render clearly in Chrome.

“My” new theme!

Posted on

Welcome to my blog on a new theme!

I am using a custom child theme of the default Twenty Twelve theme. It features a modified featured image, custom width sizing depending on the size of monitor (it’s also slightly wider on most larger monitors than the original), footer widgets and a generally different style.

My fonts are Zeyada (title), Amaranth (headings) and Lora (body). (Although I still might change it). All fonts are from Google webfonts for now.

This blog is best viewed on a higher resolution monitor (such as 1500px+) with a newer browser. It does work on tablets and phones – more or less. Right now it is currently less… especially on small tablets…I’m still working on that.

It works in all modern browsers (I think?), but I can’t vouch that all functions will work or display correctly on older browsers.

The background is made by me…although I may change it as I’m not entirely happy with it.

For anyone else wanting to undertake this, note that the CSS to this theme is a bit….odd. It makes use of newer techniques and has CSS classes that aren’t as simple as you think.

Tutorials I used

http://zeaks.org/tutorials/twenty-twelve-footer-widgets-tutorial/
http://voodoopress.com/modify-the-width-of-the-new-wordpress-twenty-twelve-theme/
http://voodoopress.com/woking-with-featured-image-in-wordpress/  (and a few other very similar ones on that subject)
http://wordpress.org/support/topic/getting-post-thumbnail-url  (linking featured imaged to itself)
+ probably more! (And lots of trial and error).

I also used several generator and such. (The media query playground is also very useful)

Stole a bit of CSS from the Presswork theme for image hovers.

I do not know PHP so I consulted tutorials for modifications to the PHP files.

Credits:

Designed by Me
Background image by me
Post background: Paper Fibers from Subtle Patterns
Page background: Textured Stripes from Subtle Patterns (modified)

The Featured Images Thing is Driving Me Insane

Posted on

So I thought it’ll be a great idea to make use of featured images, you know to showcase more photography and artwork.

I tried following various tutorials on auto-cropping featured images and it still doesn’t work. I tried copy and pasting that portion in my child functions.php and nope. I even broke the site a few times. I tried several methods and couldn’t get it working. Oddly it was working fine at first (i.e. before I made a child theme) but nope, not anymore

I’ve been at this for a while now (okay, just a day) but it’s driving me crazy and I just don’t understand why it won’t work properly! Later I discovered that it sort of works – just with new images and not in the post editor.

With much googling and some logical leaps I did finally figured it out (I was worried there that I’ll never figure it out, but I did). However, since I don’t know PHP…I’m never quite sure what I’m doing although I do have the feeling when something is probably not going to work. When the blog doesn’t load…it means I did it wrong. When the line is in the admin panel…it means I did it wrong. When only the top part of the blog loads….it means I did it wrong. So yeah, that’s how I found out I did the PHP wrong. I still find PHP confusing though. Some parts look really easy (a bit like CSS) while others are just…confusing. I should probably try to learn some PHP.

However, what I should do with single posts as I find full size featured images overwhelming and the smaller ones…well, small and it won’t word-wrap correctly. Oh well. I’ll work on it but I guess it’s okay for now.