Migrating a CCK Field into the Node Title Field

On a recent migration project I came across an odd error:

Illegal offset type in isset or empty File ...snip...\sites\all\modules\pathauto\pathauto.inc, line 182

I was using Migrate 2.5 to move date from a Drupal 6 project into Drupal 7 and had already migrated several content types without having problems with my pathauto settings.

After digging for a bit, I realized that pathauto was being passed an array for the node title causing problems with checking the cache for a previous calculated pathauto URL. Odd, node titles are always strings. Then I realized that this is the first content type that I was pulling the node title from a CCK text field and Migrate will pass that along as an array (just like all other CCK fields).

The fix is easy enough, add a prepare routine to your migration object such as this:

public function prepare($entity, stdClass $row) {
  // Because the title field is imported from a CCK field, it shows up as an
  // array. Node titles have to be strings.
  if (is_array($entity->title)) {
    $entity->title = $entity->title[0];
  }
}

And pathauto is happy again!

Permalink

-) Air PAM didistribusikan ke instalasi pipa di rumah melalui bak penampung (tower air), maka pipa dari meteran PAM ke tower air menggunakan pipa ukuran 0,5 inci. Sedangkan dari tower air ke instalasi di rumah menggunakan pipa ukuran ¾ ,1 inci.-) Air tanah, dengan bantuan jet pump, dialirkan langsung ke instalasi pemipaan di rumah. Instalasi pipa dari pompa ke instalasi di rumah menggunakan pipa yang berukuran sama dengan besar penampang pipa keluaran (outtake) di pompa.Supplier sch 40 Supplier sch 40 Supplier Plat kapal besi baja bki krakatau steel Supplier besi Pipa sch 80 baja jual hp asus murah jual hp asus murah Supplier besi beton Sni Ulir Polos undangan pernikahan ala jepang Pabrik Besi Pipa Baja Schedule 40 Toko Besi Unp Baja Supplier besi wf jual laptop asus jual laptop asus jual laptop asus murah jual laptop asus murah www.jualbesibajamurah.com Toko sch 40 Toko sch 40 Supplier besi siku Toko besi Pipa sch 80 baja Supplier besi wf baja undangan pernikahan islami Pabrik Pipa Besi Hitam Medium Jual Besi Unp Baja Toko besi wf Distributor besi beton Sni Ulir Polos polos ulir Agen sch 40 Agen sch 40 Supplier pipa besi baja sch 40 sch 80 Agen besi Pipa sch 80 baja Supplier besi unp undangan pernikahan ada fotonya Pabrik Besi Wf Harga Besi Unp Baja Agen besi wf Distributor besi beton sii Pabrik sch 40 Pabrik sch 40 Supplier Plat besi Pabrik besi Pipa sch 80 baja Supplier besi siku undangan pernikahan simple undangan pernikahan ala india Pabrik Besi H beam Pabrik Besi Unp Baja Pabrik besi wf Distributor besi beton psi Ulir Polos Distributor besi Pipa sch 80 baja Distributor besi Pipa sch 80 baja Supplier besi h beam Distributor Plat Bordes Supplier Plat besi plat kapal undangan pernikahan Pabrik Besi Beton Distributor Besi Cnp Baja Distributor Besi Beton Distributor besi beton perwira Harga besi Pipa sch 80 baja Harga besi Pipa sch 80 baja Supplier besi wf Harga Plat Bordes Supplier besi h beam baja undangan pernikahan simple www.sentrabesibaja.com Supplier Besi Cnp Baja Harga Besi Beton Distributor besi beton PAS Jual besi Pipa sch 80 baja Jual besi Pipa sch 80 baja Supplier wiremesh Jual Plat Bordes Supplier besi cnp undangan pernikahan bermanfaat Distributor Welded Beam T beam King Queen Cross Castellated Beam Agen Besi Cnp Baja Jual Besi Beton Distributor besi beton master steel ms Supplier besi Pipa sch 80 baja Supplier besi Pipa sch 80 baja Supplier besi unp Supplier Plat Bordes www.gudangbesibaja.com undangan pernikahan islami Distributor Bondek Cor Toko Besi Cnp Baja Supplier Besi Beton Distributor besi beton ksty Toko besi Pipa sch 80 baja Toko besi Pipa sch 80 baja Supplier besi cnp Toko Plat Bordes Pabrik besi Wf Baja undangan pernikahan amplop surat Distributor Atap Spandek Sni Jual Besi Cnp Baja Toko Besi Beton Distributor besi beton krakatau steel Agen besi Pipa sch 80 baja Agen besi Pipa sch 80 baja Supplier besi hollow Agen Plat Bordes Pabrik bondek undangan pernikahan bentuk dompet Distributor Plat Bordes Kembang Harga Besi Cnp Baja Agen Besi Beton Distributor besi beton jcac Pabrik besi Pipa sch 80 baja Pabrik besi Pipa sch 80 baja Supplier besi beton Sni Ulir Polos Pabrik Plat Bordes Pabrik wiremesh undangan pernikahan chinese Distributor Plat Besi Hitam Pabrik Besi Cnp Baja Pabrik Besi Beton Distributor besi beton interworld steel is Distributor Plat Bordes Distributor Plat Bordes ironsteelcenter.com Distributor Wiremesh Besi Pabrik pipa besi baja sch 40 sch 80 undangan pernikahan lucu Distributor Plat Kapal Bki Krakatau Steel Distributor Besi Hollow Baja Distributor besi hollow Distributor besi beton gunung garuda Harga Plat Bordes Harga Plat Bordes Pabrik stainless steel Harga Wiremesh Besi Pabrik besi hollow undangan pernikahan bagus Distributor Jual Besi Siku Baja Supplier Besi Hollow Baja Harga besi hollow Distributor besi beton delcoprima Jual Plat Bordes Jual Plat Bordes Pabrik atap spandek Jual Wiremesh Besi Pabrik besi beton Sni Ulir Polos undangan pernikahan bahasa inggris islam Distributor Besi Unp Baja Profil Kanal Agen Besi Hollow Baja Jual besi hollow Distributor besi beton cakra steel cs Supplier Plat Bordes Supplier Plat Bordes Pabrik baja ringan Supplier Wiremesh Besi Pabrik besi wf baja undangan pernikahan contoh Distributor Besi Cnp Profil Baja Gording Toko Besi Hollow Baja link6

Permalink

Good post jasa pembuatan website. I learn something new jasa website and challenging on pembuatan website blogs I stumbleupon every day of website.It will always be exciting to read content from other writers and use a jasa pembuatan web and jasa buat website little something from their jasa pembuatan website
You’ve written nice jual obat aborsi post , I am gonna bookmark this aborsi page , thanks for info. I actually appreciate your own obat aborsi position and I will be sure to come back here.his is a really good post. Must admit that you are among the best bloggers I have read of harga gastrul Thanks for posting this informative article of obat aborsi murah . You may havce a lot of obat aborsi, as well aborsi.
. Thank you for providing jasawebb.com information from your jasa pembuatan website profesional website. On of the good jasa website perusahaan website in search results https://jasawebb.com . Well, Thanks a lot of aborsi for such a wonderful post of obat aborsi, the stuff posted were really obat aborsi 1 bulan interesting and useful

Add new comment

The content of this field is kept private and will not be shown publicly.