Wordpress Discussion

  • Started
  • Last post
  • 164 Responses
  • dbloc0

    Anyone know how to disable custom post types from showing in the [ACF Link] existing posts suggestions.

    There is no default option. Looking for a possible hook to disable.

    https://www.advancedcustomfields…

  • cherub0

    I've been putting out wp fires left and right for the past 48 hours + with hardly any sleep. Which normally wouldn't be surprising except one small detail...

    I'm a wordpress newbie. This feels so unfair.

    My new wp site somehow LOST its WP_HOME and WP_SITEURL paths ...how it happened is beyond me but in the wp site health info tab, I see the word "undefined" next to "HOME URL" / "SITE URL" and I'm thinking... WOW... Just WOW. Thanks wordpress!

    This explains why I have been plagued with 'Update failed' error over the last few days when trying to update my site, along with the "undefined is not an object" error. (again while updating)

    I'll just leave this here in case anyone has to deal with this shite.
    https://www.reddit.com/r/Wordpre…

    I added the lines to my wp-config.php file ... fingers crossed.

    • Hacked site? Change all passwordsOBBTKN
    • Either that or my lousy host is using charity shop computers as their 'shared servers' I could see both equally likely...cherub
    • I used this a while ago, when I was into wp stuff. local dev + backup. then upload to server.
      https://localwp.com/…
      uan
    • Poke around in the database and see if there are any suspicious entries in the WP_HOME and WP_SITEURL tables. Those look like db names to me.monNom
    • You might be able to manually enter the correct values and make things work again.
      They may have been changed by a plugin. You have to be very careful with them
      monNom
    • Because you basically give a plugin admin privileges with wordpress. A plugin can edit the db, and can load additional files from remote servers.monNom
    • You have to trust them 110%.monNom
    • 'you basically give a plugin admin privileges' WAT?? plugins have root? oh wow...cherub
    • "fingers crossed" spoiler alert... the bug came back. (see my post below)cherub
    • Maybe not root right away. One way I've seen is that a cracked plugin will have a php file that when run will create a new user, email them their credentials...monNom
    • cURL additional payloads to the server, etc. Then a bot will spider the web and query sites to see if they have that file... if they do, you get owned.monNom
    • For the cracker, they get a steady flow of new compromised servers every time they run their spider. Then they send spam, steal info, ransomware. It's a farm.monNom
    • Presumably the spider part isn’t even required, you just need to insert the new user code into a commonly accessed file that gets run by the plugin.monNom
    • ^that is scary as fuck. all of it.cherub
    • Probably the best way to learn your way around how Wordpress works is to build a theme yourself from scratch.monNom
    • There are a bunch of YouTube tutorials on exactly that. You’ll understand where the difference between static pages and posts comes from, and where things live.monNom
    • The customize menu is actually a giant security hole, so it’s best to lock it down.
      All your logs are on the Apache server. Php logs, sql logs, etc.
      monNom
    • And yes. Wordpress is way overkill for a landing page. Just do a static site. No worry about security, more performant, form handling can be done with embedsmonNom
  • cherub1

    **FAIR WARNING**

    I just caught the Gutenburg editor RED HANDED producing non-compliant code. Yesterday I was sitting on the mac at uni, trying to figure out why I kept getting the: "Failed. Could not update post in the database error" I was on day 4 of working nonstop, to the point of no sleep no eating no shower, just to fix this stupid bug. Doing my head in real good. Tech support was no help, said it needed a "deeper investigation to fix."

    Next to me was sitting a student working on his laptop, he's on a business call and talking tech stuff. Then, completely on whim, I am so desperate I'll do anything mind... I decide to ask a complete stranger to help me with my wordpress problem. LOL fml.

    He says he knows java, but never seen or been around wordpress... but he'll take a look. He is intrigued when I reproduce the bug in front of him, and his engineering mind starts going thru possible causes for the bug. I tell him wordpress is based on .php. I show him some code I copied and pasted via the "copy" function on the left hand tree view inside gutenburg. Mind you, this is the exact same code the wp editor will happily DISPLAY but not ALLOW to POST to the DATABASE(UPDATE). He sees the code, and asks me is it html or php. I say "php" but I dunno it looks like .html actually. Then he does something I didn't expect.

    He asks AI to tell us, what language is this code? The AI says it's "gutenburg". There are literally tears forming in my eyes, because I realize he's solved it. He asks the AI: "convert this gutenburg code to html" The AI does it. I go back to wordpress and create a "custom html" block and insert the code. SUCCESS!!! The code was immediately accepted and the website was fixed. I did however find that the 'front page' kept reverting backwards to an older edit, and that problem was caused by having 'sync' turned on in the 'pattern' settings when I was saving the pattern. I turned sync off and the bug disappeared. I don't know why 'sync' is turned on by default to begin with?

    What a nasty introduction to wordpress. My theory is that either:
    -gutenburg was trolling me with bad code
    OR
    -my theme was bugged, so any changes made were producing bad code

    I'll update my post with "lessons learned" but that's enough for now.

    tl;dr - don't use gutenburg editor for wordpress


  • cherub0

    Update:

    I said I would update the post above with my "lessons learned" observations as a new wp user. Here goes:

    -Wp doesn't come with a log built in. Start logging immediately bcuz there will be issues, guaranteed. This shit is buggy. I'm using 'simple history' plugin for this. I can't believe wp doesn't include a log by default without having to edit .php files.

    -Once the theme is installed don't be tempted to use the "edit site" link at the top of your homepage url to start building your wp. That was my 1st big fuckup. Actually create a page, then use the "edit page" button anytime you want to update it. If you choose "edit site" you think you are editing a web page, but you are actually editing your TEMPLATE for the front page. This is where things get murky... Even worse, if you don't create a page there aren't any revisions to track / fall back on in teh pages menu because the page never existed. Only the template. It is so confusing. Which brings me to my next point.

    -Under Settings > Reading There is a confusing dichotomy between the "Your latest posts" method of showing your homepage, and the "static" method with is actually 2 things: "Homepage" and "Posts" page(rolling posts), which are both set via dropdowns. Another problem is sometimes the page u create in pages don't even show in the dropdown so u can't choose it. Reason I say it's confusing is when u use the "your latest posts" method of showing your homepage, it's unclear where wordpress is getting your homepage from if you haven't created any pages yet, and have zero blog posts. In this case you have no recent posts, so I think it defaults to using your "front page" template from your theme since it thinks your edits to the template count as a "recent posts"

    -There is a cool hack you can do, if u happen to pick one of the rare themes that's missing the "customize" option under "appearance" you can go to your url/wp-admin/customize.php and it will give you that menu on the left if u want it.

    -It's probably a sign that your theme is sub par if u need to do that hack, tho.

    -As I mentioned before, having that "sync" checkbox turned on when creating patterns and/or template parts can REALLY fuck things up because it can end up reverting sections you've already finished... and overall I recommend AGAINST editing templates for site building because my theme kept reverting my edits anyway... even after I saved them I'd have to sometimes manually go to an earlier revision point to restore my edits back.

    -Overall wp seems like overkill and bloaty at this point for creating a simple landing page. I used some random free web host's wysiwyg editor last time and I was up and running in no time. Can't say the same for wordpress. Easy to get in the weeds.

    Anyway, hope I don't get flamed for any of this, if I got stuff wrong and I likely did, just correct what I said.

    Thanks.

    • Its interesting to read someones take coming at wordpress as it is now as opposed to people who've used it for sometime and adapted.webazoot
    • I've thought they should either have made Gutenberg a new product and kept an official classic version or else not have rushed into it like they seemed to.webazoot
    • None of my clients who update their own sites can manage to use Gutenberg even though it was 'supposed' to be simpler.webazoot
    • they have a classic editor plugin for that.fadein11
    • Probably the best way to learn your way around how Wordpress works is to build a theme yourself from scratch.monNom
    • There are a bunch of YouTube tutorials on exactly that. You’ll understand where the difference between static pages and posts comes from, and where things live.monNom
    • The customize menu is actually a giant security hole, so it’s best to lock it down.
      All your logs are on the Apache server. Php logs, sql logs, etc.
      monNom
    • And yes. Wordpress is way overkill for a landing page. Just do a static site. No worry about security, more performant, form handling can be done with embedsmonNom
    • The thing about Wordpress as a platform, is that it is so accessible that people with limited knowledge can launch a website, but they don’t know how it works.monNom
    • That can be a great way to democratize the web, but it can also be a great recipe to get sued. With Wordpress especially, you’ve got to be careful.monNom
    • "The thing about Wordpress... so accessible that people with limited knowledge can launch a website, but they don’t know how it works" This is me, lol.cherub
    • ^ and it’s not a slight. It’s just that you don’t know what you don’t know. So when problems arise they are confusing. Build a couple of themes and you’ll be...monNom
    • ...much better prepared to avoid issues, or repair problems when they arise.monNom