Stacie Arellano

Artist, Author, Web Maven

Page 7 of 8

Bad Node, Bad Node, whatcha gonna do?

I recently switched a site search from using external Google CSE search to using the internal Drupal Core search. This was fairly inconsequential.

I switched to Node search under Config -> Search and Metadata, swapped the CSE block out of my sidebar in Content ->Structure, made a few theme CSS changes to match and I should have been done.

Except for indexing the content, trivial, right? Just run cron a few times and you should be all set!

Only, no. That didn’t seem to work. I kept getting a couple strange errors in the log messages.

Warning: Creating default object from empty value in node_build_content() (line 1398 of /Users/user/sites/sitename/modules/node/node.module)

and

EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7879 of /Users/user/sites/sitename/includes/common.inc).

After a good deal of searching, and some helpful hints from the #drupal channel I tried a few different modules but none of them addressed the one issue I was having, which was increasing the indexing. I was stuck at 8%.

I finally found this post http://tappetyclick.com/blog/2013/01/14/how-find-bad-node-makes-search-indexing-cause-drupal-cron-fail

Which mentioned that they had found a solution on a Portuguese site, and translated it for us.

My drupal version is a little bit different than the example at tappetyclick, but the gist is: Output the indexing process to the log by adding a watchdog line to  the core file modules/node/node.module”

'watchdog ('cron', "indexing node {$node -> nid}"); // ADD THIS LINE'

This made my node_update_index() look like this:

function node_update_index() {
$limit = (int)variable_get('search_cron_limit', 100);
 $result = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit, array(), array('target' => 'slave'));
foreach ($result as $node) {
 watchdog ('cron', "indexing node {$node -> nid}"); // ADD THIS LINE
_node_index_node($node);
}
}

Then I ran cron manually and checked the log messages, filtering for cron types only.

cron 01/11/2016 - 5:00pm indexing node 1803 Anonymous 
cron 01/11/2016 - 5:00pm indexing node 702 Anonymous 
cron 01/11/2016 - 5:00pm indexing node 7676 Anonymous 
cron 01/11/2016 - 5:00pm indexing node 6801 Anonymous

Everytime I ran into EntityMalformedException: Missing bundle property on entity of type node in entity_extract_ids(), I’d look at the last node we’d tried to index, this was the bad node, and delete it from the database.

After removing about 40 of these bad nodes the core search index actually reached 100%. /kermitarms

Drupal tips

Drupal tip #1 – Locked out of site?

Empty the ‘sessions’ and ‘cache’ tables and login at

yoursite.com?q=user

 

Drupal tip #2 – random Ajax Error in the workbench?

Check your server memory settings, you may need to increase either the mysql memory or the limits in the php.ini

 

Find your current php.ini from Drupal Admin -> Reports – > Status Reports. 

Scroll down to the PHP line and click ‘more information‘ this will take you to a standard PHPINFO() page for your server.

Look for the Loaded Configuration File line to find where your current php.ini file is.

Consider increasing the Input_Vars limit.

Make sure to restart the server after making changes to the php.ini file.

October Events

MMoCA Gallery Night!

On Friday I’m participating in the MMoCA Gallery night

It’s a city wide event happening at local galleries.

Some of my comic pages will be on display at Bare Knuckle Arts Studio on Winnebago.

My Graphic Novel will also be available for purchase. 

Snacks and refreshments from 5-9.


Fall Comicon! 

I’m also a guest creator(one of over 100) at Fall Comicon at the Minnesota State Fairgrounds Education Building. Oct 10th, 2015 10am-6pm. 

http://www.mcbacomicons.com

I’d love for you to make it to either or both events, check out my art and the art of the others. I’ll be at the Studio Friday, and I’ll have a table with my Tribute Waters Banner up at the Comicon.

Thanks,

Stacie

Fun Ways to learn Coding

It’s never too late to learn how to make games! Here are some gamified ways to learn.

https://www.codingame.com/

https://codecombat.com/

http://phaser.io/

 

 

2015 Game Jam

Get your Game Jam On!

On Saturday, the 12th, I am helping host a Code Chix Game Jam at the Madison Public Library, in The Bubbler.


Don’t Panic

As a video gamer for most of my life, with boardgames and pen and paper rpgs thrown in there as well. I’m so very thrilled to be able to share some of that passion.

I can still remember playing InfoCOM text games in my neighbor’s basement. I must have been fairly young, as I also associate this time with my crush on the fox in the animated movie Robin Hood.

I remember sitting on worn wooden chairs in front of a huge monitor,  sunlight filtering through the fluttering curtains. The screen was black, with white text reading:

You wake up. The room is spinning very gently round your head. Or at least it would be if you could see it which you can’t.

 

It is pitch black.

>

It was my first foray into text adventure games and, Hitchhiker’s Guide to the Galaxy, will always remain a fav. HHG, based on the novel of the same name, was written in a major humorous tone that makes running into bad poetry and crazy aliens and tea a deep satisfying fiction experience. Also a frustrating one, you can die in may silly ways.

That’s a link to a 30th anniversary edition, but I’m sure basic versions are still floating around the net.


 

Twine

I’ll be mentoring a group who will make an interactive text game with the Twine tool. I love how easy it is for anyone to make a game or tell a story with Twine. It takes all the pain out of hypertext and makes the process just as fun as the time I first discovered HTML links.

I love how you could make hundreds of games and stories with just the basics, but that you can also expand and use CSS and images and sound to create a different experience. You can go even further with variables and some basic code commands that keep track of what you may carry in your bag, or how many times you’ve wandered into a room.

We will have a great group of Code Chix and general public playing along all day with the goal to plan and start some games and learn in the process.  If you have time on Saturday, you should wander through. 😀

« Older posts Newer posts »

© 2018 Stacie Arellano

Theme by Anders NorenUp ↑