Jump to content

Strange things with findIDs and languages


theo
 Share

Recommended Posts

Hello

I have this simple code:

$pages = $this->pages->findIDs('id=3002|3003|3006|3007');
var_dump($pages);

The ids in the selector belong all to items inside a repeater!

It know that the example doesn't make a lot of sense, but it is reducing the problem to the essential.

If I run this code with the default language url, like myhome/export/, it shows what I would expect:

array(4) { [0]=> int(3002) [1]=> int(3003) [2]=> int(3006) [3]=> int(3007) }

If I run the same page with a non standard language url, like myhome/de/export/, it shows:

array(1) { [0]=> int(3002) }

What could be the reason for this?

Shall I write a bug report?

Link to comment
Share on other sites

@Zeka Thank you! Very good point.

On the page, these languages are allowed. That's why it returns the first repeater item!

But looking at the database for these repeater items, I can see sth. is strange:

pwrepe.thumb.png.42c62663f1ba9ee7d3b08021dd3baca3.png

You see only the first of the 4 Items in this repeater has: status1012=1, the other have 0.

But why?

Thanks to your answer I'm getting closer... :)

Btw: it has nothing to do with findIDs etc.

The problem is the same with:

$this->pages->find('parent=3001');

Now we know why, but not how it came to this.

Link to comment
Share on other sites

@Zeka: Never mind.

It's working when I add new items now.

This is probably an artifact from an older PW version I was using to create these items or some changes to language settings afterwards.

Thank you! Problem solved.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...