2.2.9 -> 3.2-4 Another Import Problem (image/article linking)

Author Message

Kenneth Colwell

Friday 13 February 2004 1:53:11 pm

I've finally got all of my files, images, users and articles imported into 3.2 but I can't get the linking working correctly between articles and the images. Has anyone else had this problem and more importantly does anyone have a solution.

I can see the images inside the image folder and I can see the links in ezcontentobject_link beween the images and the articles. If I add a new image via image upload it works.

Thanks,
Ken Colwell

Marco Zinn

Saturday 14 February 2004 2:48:26 am

Hm strange. After we had imported folders and images and -after that- articles, the images had shown up.
Does ezcontentobject_link store the "related objects"? Are the right objects "related" to your article? There should be an "object"-tag inside the article where the image should be. Is this true?
If so, maybe you have a template problem. An "old" problem with ez3 default templates was, that the "embed" template just printed the image (node) name and linked to the image node, but you want to see the image inside the article (just as in admin interface).

Can you insert and see an imported image into a newly created article?

Note: In 3.x, images are using the object-tag. By design ;) object-tags cannot be inside lists, for example. Maybe this is true for tables, too. That means, that you cannot have images in a list (list item), without tweaking the kernel code.
Of course, they should appear in a "flat" article (just paragraphs).

Marco
http://www.hyperroad-design.com

Kenneth Colwell

Saturday 14 February 2004 10:25:01 am

Hi,

Yes I did the import in the correct order: folders, images, articles

Old article: http://www.muc.edu/article/articleview/4280/1/139/
New article: http://test2admin.muc.edu/content/view/full/10753
Click the edit button and the url becomes: http://test2admin.muc.edu/content/edit/10232/2/
The object tag is in the article: <object id="5701" size="medium" align="right" />
But nothing is listed in the right "related objects" box

Perhaps the problem is the article object ID which seems to change from 10753 to 10232 when I click edit?

In ezcontentobject_link table I have the following:

select * from ezcontentobject_link where to_contentobject_id=5701
+------+-----------------------+----------------------------+---------------------+
| id | from_contentobject_id | from_contentobject_version | to_contentobject_id |
+------+-----------------------+----------------------------+---------------------+
| 1770 | 10232 | 1 | 5701 |
+------+-----------------------+----------------------------+---------------------+

also from ezcontentobject:

select * from ezcontentobject where id=10753;
Empty set (0.00 sec)

select * from ezcontentobject where id=10232;
+-------+----------+------------+-----------------+----------------------------------------------------------------------------------+-----------------+--------------+------------+------------+--------+----------------------+
| id | owner_id | section_id | contentclass_id | name | current_version | is_published | published | modified | status | remote_id |
+-------+----------+------------+-----------------+----------------------------------------------------------------------------------+-----------------+--------------+------------+------------+--------+----------------------+
| 10232 | 46 | 0 | 2 | Dr. Robert D. Ballard, Deep Sea Explorer of Titanic, to Present Schooler Lecture | 1 | 0 | 1074117591 | 1074117591 | 0 | article_article_4280 |
+-------+----------+------------+-----------------+----------------------------------------------------------------------------------+-----------------+--------------+------------+------------+--------+----------------------+

New images work great and the imported images don't appear in the articles in the admin section or the user site. the imported images are viewable by going to the images folder in the administration system.

Thanks for your help,
Ken Colwell

Marco Zinn

Saturday 14 February 2004 11:54:06 am

Hi,
I see, that your site is public. Do you want me to have a log in the admin interface?
BTW: No, you content ID does not change.
When ez uses /content/view/<id>, this is a NODE ID. When you see something like /content/edit/<id>/<version>, the ID is a CONTENT ID. After import, those ID usually are close to earch other, but this will change, when you work with the system.

I don't know, if the DB tables are necessary or the right ones for this. I also don't know, if the import should create "related objects". But it is not necessary to relate an object in order to include it in the article!
You can use an object-tag without having the object related to your current object.
Your tags seem okay, as well as you DB entries.
Check the Image object. Do you have data in all fields? Is the data looking good? Do you have an object name and an image?
Sometimes, the import scripts do not generate all data fields as needed by ez3. For example, be prepared to have some fun with MIME-Types...

Marco
http://www.hyperroad-design.com

Kenneth Colwell

Saturday 14 February 2004 7:48:03 pm

Hi Marco

Thanks for explaining the number change. If you would like to login and take a look for yourself send me an email to [email protected] and I will send you the login information.

My ezimage table has the following entries:

select * from ezimage where alternative_text like "%ballard%";
+----------------------------+---------+---------------+--------------------+------------+-----------------------+
| contentobject_attribute_id | version | filename | original_filename | mime_type | alternative_text |
+----------------------------+---------+---------------+--------------------+------------+-----------------------+
| 16485 | 1 | phpCwXjCZ.jpg | robert ballard.jpg | image/jpeg | Dr. Robert D. Ballard |
| 16755 | 1 | phpeaquCu.jpg | ballard.jpg | image/jpeg | Dr. Robert D. Ballard |
| 16485 | 2 | phpCwXjCZ.jpg | robert ballard.jpg | image/jpeg | Dr. Robert D. Ballard |
+----------------------------+---------+---------------+--------------------+------------+-----------------------+

select * from ezimagevariation where contentobject_attribute_id like 16485 or contentobject_attribute_id like 16755 or contentobject_attribute_id like 16485;
+----------------------------+---------+-----------------------------+-----------------+-----------------+------------------+-------+--------+
| contentobject_attribute_id | version | filename | additional_path | requested_width | requested_height | width | height |
+----------------------------+---------+-----------------------------+-----------------+-----------------+------------------+-------+--------+
| 16485 | 2 | phpCwXjCZ_100x100_16485.jpg | p/h/p | 100 | 100 | 84 | 100 |
+----------------------------+---------+-----------------------------+-----------------+-----------------+------------------+-------+--------+
1

select * from ezcontentobject_attribute where contentobject_id like 5701;
+-------+---------------+---------+------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------+------------+------------+-----------------------+--------------+-----------------+
| id | language_code | version | contentobject_id | contentclassattribute_id | data_text | data_int | data_float | attribute_original_id | sort_key_int | sort_key_string |
+-------+---------------+---------+------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------+------------+------------+-----------------------+--------------+-----------------+
| 16483 | eng-US | 1 | 5701 | 116 | | 0 | 0 | 0 | 0 | |
| 16484 | eng-US | 1 | 5701 | 117 | <?xml version="1.0" encoding="UTF-8"?>
<section>
<paragraph>Dr. Robert D. Ballard</paragraph>
<paragraph />
</section> | 1045487555 | 0 | 0 | 0 | |
| 16485 | eng-US | 1 | 5701 | 118 | | 0 | 0 | 0 | 0 | |
| 16483 | eng-US | 2 | 5701 | 116 | | 0 | 0 | 0 | 0 | |
| 16484 | eng-US | 2 | 5701 | 117 | <?xml version="1.0" encoding="UTF-8"?>
<section>
<paragraph>Dr. Robert D. Ballard</paragraph>
<paragraph />
</section> | 1045487555 | 0 | 0 | 0 | |
| 16485 | eng-US | 2 | 5701 | 118 | | 0 | 0 | 0 | 0 | |
+-------+---------------+---------+------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------+------------+------------+-----------------------+--------------+-----------------+

All of this seems logical, I'm not really seeing anything wrong? Any ideas?

thanks,
ken colwell

Kenneth Colwell

Monday 16 February 2004 1:53:04 pm

Marco clued me in to the fact that some of my images were missing the name parameter from the old database and when you add the name to the image it would suddenly start appearing with the appropriate article. However, it turns out that this was just a coincidence. After using the import script none of the images appear with the appropriate articles even though the embed tag is located in the article. However, if you edit the image within the publishing system and save the results the image then appears, as it should. Does anyone have any idea what could cause such behavior?

Thanks,
Ken Colwell

Kenneth Colwell

Tuesday 17 February 2004 8:14:05 am

Hello,

I did a table by table comparison between one of the images that had been edited and one of the images that didn't work and the only difference that I found was the status field in the ezcontentobject table. All of my imported images had there status field set to 0. Once the status is changed to 1 all of the images appear in the articles on both the user and admin sites.

mysql> update ezcontentobject set status="1" where contentclass_id = "5";

Special thanks to Marco for taking a look at my site and helping me narrow the list of potential problems.

Thanks,

Ken Colwell

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.