Jump to content

Template System


Recommended Posts

On 1/13/2017 at 5:55 AM, Maniutek said:

Hello! I ask again, I will try to explain it better ...
The first question is whether you can set one of the fields as address, that someone pasted in this field link to the writing topic, this field will be available as a link that you will not need to copy the link, but do not you just click and open the new flounder, card?

The second question, as it is with hiding these fields? I mean that, for example. I'll do the Password field, and that someone will complement and write about it, it's just the admin will see this field and others will see such stars or something similar?

Again, you can customize the view template any way you want. That means, allowing the URL field to be displayed as a link, or hiding certain fields for certain groups. It uses the same logic as any other template in the IPS theme.

Link to comment
On 2/4/2017 at 3:00 PM, MGeek said:

@HeadStand Hello! IPS 4.1.18.1 - not creates a field with a selection list

@MGeek, I'm not having any issues on 4.1.18.1. Can you please be more specific in describing the issue? What steps are you taking? Where is the field not created? What error message are you getting? Is this an issue with creating the field in the ACP or is it an issue with putting the field on the form on the front end? If it's the front end, which component are you looking at (topics/calendar/etc)?

There are so many different things at play here, you're going to have to give me as much detail as possible. 

Thanks.

Link to comment
48 minutes ago, HeadStand said:

@MGeek, I'm not having any issues on 4.1.18.1. Can you please be more specific in describing the issue? What steps are you taking? Where is the field not created? What error message are you getting? Is this an issue with creating the field in the ACP or is it an issue with putting the field on the form on the front end? If it's the front end, which component are you looking at (topics/calendar/etc)?

There are so many different things at play here, you're going to have to give me as much detail as possible. 

Thanks.

the problem is when you create a field in the ACP. With the selection list. After saving this field very much:

UPDATE `templates_fields` templates_fields  SET `field_id`=2,`field_key`='test_test',`field_searchable`=0,`field_type`='Select',`field_content`='["test1","test2","test3"]',`field_multiple`=false,`field_not_null`=true,`field_max_input`=0,`field_input_format`=NULL,`field_search_type`='exact' WHERE field_id=2 
IPS\Db\Exception: Unknown column 'field_search_type' in 'field list' (1054)
#0 /home/ih184629/public_html/system/Db/Db.php(991): IPS\_Db->preparedQuery('UPDATE `templat...', Array)
#1 /home/ih184629/public_html/system/Patterns/ActiveRecord.php(491): IPS\_Db->update('templates_field...', Array, Array)
#2 /home/ih184629/public_html/system/Node/Model.php(2014): IPS\Patterns\_ActiveRecord->save()
#3 /home/ih184629/public_html/system/Node/Model.php(2691): IPS\Node\_Model->save()
#4 /home/ih184629/public_html/system/Node/Controller.php(383): IPS\Node\_Model->saveForm(Array)
#5 [internal function]: IPS\Node\_Controller->form()
#6 /home/ih184629/public_html/system/Dispatcher/Controller.php(85): call_user_func(Array)
#7 /home/ih184629/public_html/system/Node/Controller.php(63): IPS\Dispatcher\_Controller->execute()
#8 /home/ih184629/public_html/applications/templates/modules/admin/templates/fields.php(30): IPS\Node\_Controller->execute()
#9 /home/ih184629/public_html/system/Dispatcher/Dispatcher.php(129): IPS\templates\modules\admin\templates\_fields->execute()
#10 /home/ih184629/public_html/admin/index.php(14): IPS\_Dispatcher->run()
#11 {main}

 

Edited by MGeek
Link to comment
19 minutes ago, B507 Admin said:

I'm having an issue where, once I enable the template application, my site goes down. It also will not let me go into the Admin forum settings. Any idea what is causing this?

I definitely need more information. When you say "my site goes down", what does that mean? Is there an error message? Frontend, ACP, or both? Anything in the php error logs?

Obviously I'm not having that problem and no one else has reported that either, so I haven't a clue until I get more details.

 

Link to comment
1 minute ago, HeadStand said:

Excuse me while I go into a corner and scream out a few curses... this makes NO SENSE.... :( 

I will keep trying....

I have no idea why as the logs show 200 codes

 

208.86.202.10 - - [07/Feb/2017:13:40:57 -0800] "GET /forums/topic/177191-bmw-2002-turbo-mpower-t-shirt-bmw-neue-klasse-quality-graphics-design/ HTTP/1.1" 200 355 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36"

 

Link to comment
Just now, misfit76 said:

I just attempted to instal the application and now the site is getting a blank page https://www.bmw2002faq.com  Is there a way to roll back without the Admin Control panel?

Any help is appreciated. 

What on earth???? This is so not my day.

If you have access to the DB, run the following query to disable the app:

update core_applications set app_enabled=0 where app_directory='templates';

 

1 minute ago, misfit76 said:

I have no idea why as the logs show 200 codes

 


208.86.202.10 - - [07/Feb/2017:13:40:57 -0800] "GET /forums/topic/177191-bmw-2002-turbo-mpower-t-shirt-bmw-neue-klasse-quality-graphics-design/ HTTP/1.1" 200 355 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36"

 

That would be your access log. You should have a separate error log, though, which is where the error would likely be. If you can find it, please post it.

I have to step out for about an hour, but I'll be back to look at this issue as soon as I come back. I cannot for the life of me understand what's happening here today....

Link to comment
12 minutes ago, misfit76 said:

Not seeing errors in the error log or the php log. Ran the query to disable the application, but still getting a blank page.  I am still on 4.1.17

thanks

Oh, stupid me. It's still cached. You should have an applications file in your datastore directory. Just delete it. 

Link to comment

this is all i have in the datastore 

root@ds9810(Linux) $ ls -al
total 4
drwxrwxr-x  3 skupper pg361726   45 Apr  5  2016 .
drwxrwxr-x 22 skupper pg361726 4096 Feb  7 14:37 ..
-rw-r--r--  1 skupper pg361726    0 Jun  7  2016 index.html
drwxrwxrwx  2 skupper pg361726   75 Feb  7 10:18 membermap_cache

 

Link to comment
38 minutes ago, misfit76 said:

this is all i have in the datastore 


root@ds9810(Linux) $ ls -al
total 4
drwxrwxr-x  3 skupper pg361726   45 Apr  5  2016 .
drwxrwxr-x 22 skupper pg361726 4096 Feb  7 14:37 ..
-rw-r--r--  1 skupper pg361726    0 Jun  7  2016 index.html
drwxrwxrwx  2 skupper pg361726   75 Feb  7 10:18 membermap_cache

 

Then you're using something else for the cache.... any idea what you're using?

Link to comment
35 minutes ago, HeadStand said:

So... I was able to reproduce this issue (and yours too, @MGeek). Both issues are fixed and a new version is up in the Marketplace.

@misfit76 - even with the white screen, I was still able to get into the ACP. You can try deleting your plugins/hooks.php file to see if that helps. Then you can get the latest version from the Marketplace and install.

Removed all mentions of the Template System from the hooks.php and the site is back to normal.  thank you

Link to comment
45 minutes ago, MGeek said:

@HeadStand The problem remained

2017-02-08_03-02-10.thumb.png.b0884edd395e6e2bfa99ed88fa535b0e.png

When the field is created the same error

This is not the same problem. The error message you showed me before was different - that was related to the system looking for a missing field.

Where are you seeing this message? When do you get it? I have never ever seen this. Also.... it's not an error. It can and should be ignored.

 

Link to comment

@HeadStand when creating the field

UPDATE `templates_fields` templates_fields  SET `field_id`=2,`field_key`='test_test',`field_searchable`=0,`field_type`='Select',`field_content`='["test1","test2","test3"]',`field_multiple`=false,`field_not_null`=true,`field_max_input`=0,`field_input_format`=NULL,`field_search_type`=NULL WHERE field_id=2 
IPS\Db\Exception: Unknown column 'field_search_type' in 'field list' (1054)
#0 /home/ih184629/public_html/system/Db/Db.php(991): IPS\_Db->preparedQuery('UPDATE `templat...', Array)
#1 /home/ih184629/public_html/system/Patterns/ActiveRecord.php(491): IPS\_Db->update('templates_field...', Array, Array)
#2 /home/ih184629/public_html/system/Node/Model.php(2014): IPS\Patterns\_ActiveRecord->save()
#3 /home/ih184629/public_html/system/Node/Model.php(2691): IPS\Node\_Model->save()
#4 /home/ih184629/public_html/system/Node/Controller.php(383): IPS\Node\_Model->saveForm(Array)
#5 [internal function]: IPS\Node\_Controller->form()
#6 /home/ih184629/public_html/system/Dispatcher/Controller.php(85): call_user_func(Array)
#7 /home/ih184629/public_html/system/Node/Controller.php(63): IPS\Dispatcher\_Controller->execute()
#8 /home/ih184629/public_html/applications/templates/modules/admin/templates/fields.php(30): IPS\Node\_Controller->execute()
#9 /home/ih184629/public_html/system/Dispatcher/Dispatcher.php(129): IPS\templates\modules\admin\templates\_fields->execute()
#10 /home/ih184629/public_html/admin/index.php(14): IPS\_Dispatcher->run()
#11 {main}

After going to clear the cache and see this error

2017-02-08_03-56-56.thumb.png.67f52311b98c2083f8b49fa77d237c5c.png

Link to comment

@HeadStand I create the field. I have an error

UPDATE `templates_fields` templates_fields  SET `field_id`=2,`field_key`='test_test',`field_searchable`=0,`field_type`='Select',`field_content`='["test1","test2","test3"]',`field_multiple`=false,`field_not_null`=true,`field_max_input`=0,`field_input_format`=NULL,`field_search_type`=NULL WHERE field_id=2 
IPS\Db\Exception: Unknown column 'field_search_type' in 'field list' (1054)
#0 /home/ih184629/public_html/system/Db/Db.php(991): IPS\_Db->preparedQuery('UPDATE `templat...', Array)
#1 /home/ih184629/public_html/system/Patterns/ActiveRecord.php(491): IPS\_Db->update('templates_field...', Array, Array)
#2 /home/ih184629/public_html/system/Node/Model.php(2014): IPS\Patterns\_ActiveRecord->save()
#3 /home/ih184629/public_html/system/Node/Model.php(2691): IPS\Node\_Model->save()
#4 /home/ih184629/public_html/system/Node/Controller.php(383): IPS\Node\_Model->saveForm(Array)
#5 [internal function]: IPS\Node\_Controller->form()
#6 /home/ih184629/public_html/system/Dispatcher/Controller.php(85): call_user_func(Array)
#7 /home/ih184629/public_html/system/Node/Controller.php(63): IPS\Dispatcher\_Controller->execute()
#8 /home/ih184629/public_html/applications/templates/modules/admin/templates/fields.php(30): IPS\Node\_Controller->execute()
#9 /home/ih184629/public_html/system/Dispatcher/Dispatcher.php(129): IPS\templates\modules\admin\templates\_fields->execute()
#10 /home/ih184629/public_html/admin/index.php(14): IPS\_Dispatcher->run()
#11 {main}

The field is created:

2017-02-08_00-05-45.png.ac056eb03b8e7c9e

After all the action I'm going to clear the cache (something is not working correctly). Shows me that there are errors in the database. I push the button and shows me in the window this error

2017-02-08_03-56-56.png.f2d7b696ab72f13d

Link to comment

I will take another look. But for future reference, using that tool doesn't really help you for 3rd party apps. Clearing a cache usually is related to things like themes or actual cached data. It does absolutely nothing here.

And ignore the "database error". There is no error. That message is IPS thinking that your new custom field doesn't belong in the database  (because it wasn't there on installation). Just please ignore it. 

Link to comment
  • Recently Browsing   0 members

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