Forums / Install & configuration / 2.2.9 -> 3.2-4 Another Import Problem (image/article linking)

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 colwelkg@muc.edu 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

eZ debug

Timing: Jan 19 2025 04:19:21
Script start
Timing: Jan 19 2025 04:19:21
Module start 'content'
Timing: Jan 19 2025 04:19:21
Module end 'content'
Timing: Jan 19 2025 04:19:21
Script end

Main resources:

Total runtime0.3238 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.2344180.7891
Module start 'content' 0.00660.0040 770.0234106.0078
Module end 'content' 0.01060.3131 876.0313534.4531
Script end 0.3237  1,410.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00391.1979200.0002
Check MTime0.00140.4220200.0001
Mysql Total
Database connection0.00090.277710.0009
Mysqli_queries0.270983.65051410.0019
Looping result0.00180.54471390.0000
Template Total0.312996.610.3129
Template load0.00080.252010.0008
Template processing0.312096.365710.3120
Override
Cache load0.00050.166810.0005
Sytem overhead
Fetch class attribute can translate value0.00080.240010.0008
XML
Image XML parsing0.00030.095710.0003
General
dbfile0.00461.4095200.0002
String conversion0.00000.001530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0003 secs