Jump to content

Recommended Posts

Posted

Cant't fix problem caused by custom PHP code for selectable pages (I'm experimenting with "dependable" fields). The code is as below:

$country = $page->address_country;
$state = $page->address_state;
$pages->get("/db/country-specific/")->find("title=$country")->children("title=Locations")->children("title=$state")->children; 

When I'm trying to save new page, I get:

Method PageArray::children does not exist or is not callable in this context

Now, problem is that few pages that I've managed to create with this code are invisible and inaccessible (see picture).

Does anybody know how to delete them? I guess I need to go to PhpMyAdmin? Or it can be fixed within PW admin? Thanks in advance!!

Also, as far as I understand, code doesn't work as address_country and address_state fields are not defined yet in NEW page... Please correct. Thanks!

post-1193-0-40593300-1369329866_thumb.jp

Posted

You can't call children on page array only for single pages.

Ou and those invisible pages seem to have no title.

Posted

yes, seems that titles were not created but pages were created... so since created pages are not accessible, I can't enter pages and delete them... 

Posted

Yes. Then go to the template of those pages and enter name as the alternative list label under advanced tab.

  • Like 1
Posted

You could go to phpMyAdmin, search for all Pages that have an empty title and give them a title.

Or note the ID and then just enter this as ?id=xxx when editing another page.

You find the titles in the table field_title under data.

Edit: Soma's solution is simpler :)

Cheers

  • Like 1
Posted

I found creative way to fix the problem!

HTML inspection in Chrome over empty raws has shown that there are empty <a> tages which I manually filled with qwerty text. After that page became accessible with all edit/move/delete links near it. )))

  • Like 2
Posted

Soma, Wanze - thank you! My solution may be not very elegant, but definitely quick )))

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
×
×
  • Create New...