HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[RESOLVED] - Forums - editing - error

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#62255 (In Topic #13553)
Avatar

Community saint

Background: After importing the Forums from the defunct version 3.x.x site, I found myself with several duplications. No problem, I thought, until I went in and deleted one of the duplicates, and now find I am getting this ...

An error has occurred

PHP NOTICE [8] Undefined offset: 4 in /home/fletch/public_html/anglo/adminzone/pages/modules/admin_ocf_forums.php on line 230 (version: 5.0.1, PHP version: 5.2.14, URL: /anglo/adminzone/pg/admin_ocf_forums/ed)



Expand: Stack trace Stack trace



I cannot figure out what the 'Undefined offset' error is referring to, and have looked closely at

  • adminzone/pages/modules/admin_ocf_forums.php
  • sources/aed_module.php
  • sources/zones.php
but am none the wiser.

Any help would be appreciated, because I cannot even access the Forums through the Admin zone to delete categories or category groups or entries , so that I may start anew!


Part 2:

An error has occurred

PHP NOTICE [8] Undefined index: description in /home/fletch/public_html/anglo/forum/pages/modules/forumview.php on line 420 (version: 5.0.1, PHP version: 5.2.14, URL: /anglo/forum/pg/forumview)



Expand: Stack trace Stack trace



Off to do a 'File Integrity Check' - just in case it 'fixes' the problem before I start whining uncontollably ...

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62259
Avatar

Working on this now.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62260
Avatar

Okay, I'm not sure how, but somehow a forum is in a non-existent category (now known as a 'forum grouping').

Please run this query:

Code

UPDATE ocp5_f_forums SET f_category_id=1 WHERE f_category_id=4;

(I'm assuming that there is still a forum grouping 1)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62261
Avatar

Community saint

Nope. Still getting an error and stack trace, making it impossible to edit or delete …

Looks like a rip out and reinstall is called for, not something I really wanted to do.

Bummer!

 :'(

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62263
Avatar

Is it still "Undefined offset: 4", or a different offset?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62275
Avatar

Community saint

It is probably even MORE frustrating for you than me, Chris, that I haven't pursued this any further.

Ripped out the whole site and reinstalled. Did the 'ocP merge' bit and it imported most things, EXCEPT for the Forum posts this time (and one of the catalogues). I have a stats reading of several thousand posts, but the column entries show a big fat ZERO.

Back to the drawing board …

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62280
Avatar

Which catalogue did not import?

As for the forum posts (and members etc), I noticed myself that they don't import if you choose your existing site base directory as the import directory instead of the correct base directory of the old site or if the database details for the forum in the info.php of the old site specify the same database name as the current site uses (actually these scenarios are equivalent). This is because ocPortal thinks the forums are on the same network and thus won't import the forum data back into that network.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62295
Avatar

Community saint

1. The catalogue that didn't import is called 'A-I directory' with an ident of 'aidirectory'. on the old site it also carried an 'id' of '75'.

Here is the error message and Stack trace ...

An error has occurred

A category (0) that doesn't exist is being referenced (version: 5.0.1, PHP version: 5.2.14, URL: /anglo/site/pg/catalogues/category/index.php?catalogue_name=aidirectory)


Expanded advice

A category is being referenced or linked to by name/identifier, but there is no such category.

How did this happen?

Common causes include:
  1. If you delete a category and then use your back button to try and access what you just deleted.
  2. If you follow a link to a category that has since been deleted.

It is also possible that there is some form of corruption in the database. For example, an entry says it is in a category that doesn't actually exist.

How do I fix it?

Fix any invalid links.

If you believe you have found a bug in the software, report it.

Expand: Stack trace Stack trace









2. I'll come back to the Forum posts later. on my previous 'import' safari the posts from the old site actually DID get ported across, because I remember the 'Comments' forum being fully populated, although they didn't actually tie in with the original posts, probably because of a mismatch of idents.



Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62303
Avatar

I put the query to fix that error in your other topic.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62307
Avatar

Community saint

Chris Graham said

I put the query to fix that error in your other topic.
Thanks

Update:
The 'catalogue' problems have all been fixed now (I posted the result in the other post). Now to tackle the Forum problem.

Trouble is, each time I have a stab at importing the 'Forum' it either won't do it, referring me to other dependencies, or goes through the motions and imports no topics, but manages to duplicate all the Forums which then leaves me with the problem of trying to delete each of the duplicates. Will take another look at the other 'config' file, but don't understand why it would have imported posts once before, and refuses to play nice, now!

Laborious, or what?

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62343
Avatar

Just gone through and imported the forums on mine. Worked, but appears like it did not. You need to recalculate all the forum caches in the Cleanup Tools module. I note that the importer does not tell you this, that is an oversight (it does for the importers for third party software).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62378
Avatar

Community saint

Chris Graham said

You need to recalculate all the forum caches in the Cleanup Tools module.

Yeah, yeah, and YEAH!

Forums now showing post totals, and are also click-accessible for the viewer.

NOW

  • Must look at how the 'Comments' can be (re)linked to the posts that were imported
  • Must look at what can be deleted from the Forums - so long as it doesn't affect the previous bullet-point

 :thumbs:



Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62384
Avatar

Community saint

Fletch said

  • Must look at what can be deleted from the Forums - so long as it doesn't affect the previous bullet-point

I'm *bumping* this one and quoting myself ...!!!

Tried deleting the least important of one of my 'imported' forums, deleting and setting the FIRST of the two 'Trash' forums (first original, second imported) as the receiving forum, but got this result ...

An error has occurred

Unfortunately a query has failed [SELECT * FROM ocp5_f_topics WHERE () AND t_validated=1 ORDER BY t_cache_last_time DESC LIMIT 1] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND t_validated=1 ORDER BY t_cache_last_time DESC LIMIT 1' at line 1] (version: 5.0.1, PHP version: 5.2.14, URL: /anglo/adminzone/pg/admin_ocf_forums/__ed/25)


Expand: Stack trace Stack trace



Definitely need some help and direction with this.






Update:
Making HUGE progress with the merging/deleting of imported (similar) forums. In fact the task is almost complete using a sort of 'workaround'.

When electing to delete a forum and move posts to another similarly named one (they are all OCF in any case) you are presented with the 'error message/stack trace'. The 'workaround' is to ignore the 'error message/stack trace' and do a 'Topics' & 'Forums' cache optimization using ocP-tools.

Like magic, everything appears in the right place, and THEN the forum chosen for deletion can be deleted.

Will the comments link to the original posts? That's probably a totally different ball game. Will update if I am successful.



Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62432
Avatar

Confirmed the problem in the stack trace. It's due to permissions, apparently your user doesn't have permissions in one of the forums involved so it is failing to recalculate cacheing. That's a bug.

If you choose to delete topics instead of moving that'd fix it too.

Looking into ID preservation now.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62433
Avatar

Overwrite the existing data_custom/execute_temp.php with this file then load it up by URL.

Attachment
data_custom/execute_temp.php
» Download: execute_temp.php (4 Kb, 171 downloads so far)


That should fix associations for:
  • news
  • catalogue entries
  • iotds
  • events
  • gallery images
I noticed that you also have gallery contents but these have textual names so the association should be fine as-is.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62441
Avatar

Community saint

Chris Graham said

That should fix associations for:
  • news
  • catalogue entries
  • iotds
  • events
  • gallery images
news: TERRIFIC! This is what I really needed. It worked!
catalogue entries: I haven't actually checked this area as I'd already 'fixed' the issue using your previous advice.
iotds: Nope. The links in the 'Comments' section of the Forum still call the previous (original) ID, so it is probably impossible to sort this one out. For me this really is an irrelevance. Most of my IOTDs need to be culled in any case.
events: Haven't checked this yet.
gallery images: Again, I'd 'fixed' this using your previous advice.

Many of the problems I've encountered with the 'import' have been resolved using your two 'UPDATE' SQL query edits (in phpMyAdmin) that you supplied in previous posts.

Many of the 'linkage' problems I continue to encounter are problems of my own making. My previous way of working used 'absolute' URLs, always, so changing my server has contributed to broken URLs for just about any link I'd previously entered. I have now changed my ways and happily use the 'relative' method by substituting {$BASE_URL} where necessary.

I guess it needed a major server change to drive the point home for me. So, anybody reading this that DOESN'T use relative URLs, be warned, you will inherit this headache some time in the future if you make major life (server) changes!

:thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62457
Avatar

Community saint

Fletch said

iotds: Nope. The links in the 'Comments' section of the Forum still call the previous (original) ID, so it is probably impossible to sort this one out. For me this really is an irrelevance. Most of my IOTDs need to be culled in any case.

iotds: DO work when clicking on the comments appended to an IOTD.

It is the linkage in reverse that doesn't (Forum >> Comments >> Marker post >> IOTD). I thought it was probably my initial screw-up with the 'absolute'/'relative' URL thingy, but since the link is appended by the system, I have to exonerate myself of tinkering with that aspect of the script.

Despite the tute warning that an 'import-merge' should be conducted between two similar major versions of ocP, here is proof that, despite the disclaimer, DIFFERENT versions of ocPortal WILL merge successfully! But it requires a bit of 'extra' work!

I think we can call this one [RESOLVED].

Thanks for the mega-help.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62473
Avatar

I actually had forgotten about the links back to the content. This updated script will fix those links. However, if will only correct the IDs in them, it won't change anything else (e.g. if the base URL is now different, it won't fix that).

Attachment
» Download: execute_temp.php (5 Kb, 141 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#62489
Avatar

Community saint

Thanks Chris.

That fixed the 'link-ID' issue. All that is left for me to do is to edit the URLs!

Boring but necessary …

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#62491
Avatar

May help you…

MySQL :: MySQL 5.0 Reference Manual :: 11.5 String Functions

(You could write an SQL query to do string replaces in the ocp4_translate table).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand