Search

Nickdunn, is there a case for the views count not counting correctly if the site has sitecache running? i.e cache_lite extension?

Analytics and views don’t seem to be matching up very well with the number of views recorded from google compared to a simple page view count?

thoughts anyone?

moonoo2

Nickdunn, is there a case for the views count not counting correctly if the site has sitecache running? i.e cache_lite extension?

Absolutely. If you’ve got Cachelite installed then page requests won’t execute any Data Sources at all so increment number won’t increment.

hmmm, makes sense really. Anyway to simply grab analytics stats into symphony?

Doubt it but really need cache light on my DS cos it’s mahoosive (massive) :)

hi,

this is a usefull extension, except that it doesn't works as it should :)

Normally to consult a value, it shouldn't change. they aren't photons :)

Example, for my case I would like to to check the count of posts in a topic on a listing of topics. With the actual behavour that makes all my list of posts become read 1 more time while I haven't opened them yet :D

I propose you a simple solution to this issue :

  • inverse the behavour
  • when the field is selected on a datasource the value doesn't change (consultation of the value)
  • when the field isn't selected on a datasource it increases.

regards,

Good point! Since I first created this extension Symphony had advanced in that it now allows a field to provide several output modes. I will update this field so that it provides two output modes (in the Included Elements list in the data source editor) "value" and "increment". This way you can always get the value into your XML, but choose whether to get the value only, or increment as well.

How soon do you need this?

hhm, I am making a game community website with forums and many many stuff like wars, ranking etc :D I will not finish all functionalities within 1month

so it's not an ASAP, but if u can make it early I will apreciate :)


As side note : I have choosen symphony just to give it a try after I saw that drupal was so limitating developpers. What I did here is to represent an UML class diagram using symphony's sections. It rox :P

What I did here is to represent an UML class diagram using symphony's sections. It rox :P

Don't forget to install Nick's Entity Diagram extension if you want a quick overview of sections, fields and relationship between them ;)

Increment Number updated to version 1.2.1 on 7th of March 2011

This update implemented the suggestion above. When adding this field to a data source you now have two options:

  • value only
  • increment

It should be obvious: the first just returns the value in the XML. The second increments the value by one then returns it in the XML.

I have to say that while the concept behind this extension is simple, the implementation is really smart. Thanks Nick :-)

tx a lot nick :) it's great work :P

and hehe : Entity diagram is cool stuff but I have already an UML diagram :P

after checking I have now 41 sections xD

Hi Nick - thanks for this great extension first of all. However I think I just noticed a small issue/bug. Not sure if it is with this extension or symphony itself. using v1.3 of extension and 2.2 symphony

I have created two sections to track user movement around the page - and I set an id field which represents the member, another to track the page and the last one is an increment number field.

If the ds returns empty an event is launched automatically using ajax and sets the views to 1(not sure if that should be allowed). What happens is that whilst browsing and calling on the ds or going in the backend on the section automatically adds 1 to the last dynamically created item (which seems to be a weird behaviour) ps behavior noticed only for logged in user (where member-id is set).

I am not sure if this could be the case but does symphony automatically attach all datasources to back-end pages? and say if a match was returned all the numbers fetched by the DS incremented automatically?

Hmm not sure I quite follow. But firstly, check whether "Developer Mode" is enabled in the field's settings. Turn it off if it's on. Secondly, which "mode" are you choosing when showing the field in the data source? Only the "increment" mode will actually do the incrementing. If it's not selected in the data source editor, it won't run.

does symphony automatically attach all datasources to back-end pages

Nope. Not unless you're using the Global Resource Loader extension.

When showing the datasource I am using the increment mode as I want it to increment when a member is browsing the particular page. Developer mode is turned off.

Sorry for being unclear but I ended up testing half way during the post to be able to determine what the possible causes could be.

I am not using Global Resource Loader so I can rule that option out. (not sure if any other extension would have the same behavior)

What I noticed is the following - on my datasource I was filtering using member id and page id. (and set to return only 1 item) and set the datasource to return empty if member-id is not set. The datasource seemed to be matching on all the backend pages and incrementing the value of the last created item by 1 (whilst I was logged in) since I have switched it to filter using page-id and resolved the issue.

However it still seems strange to me that the values were incrementing anyway on the backend... so I am thinking that the DS was attached to the backend without my knowledge not sure if that makes any sense. (this was verified partly by logging out of the member's extension and no number incremented hence it returned an empty ds since member-id was non-existant)

When creating an Entry using PHP code and running commit() on the entry, it will result in an error due to this field. Apparently the $field->get('field_id') call on class.entry.php line 276 returns null instead of the actual field id. Anybody know how to fix this?

Update: this is apprently fixed by: https://github.com/oleae/numberfield/commit/9a24f01569f8ae1de82ae355fc84021e45cb67d8

Open ISSUE: Extension not compatible with Symphony 2.4 https://github.com/symphonists/incrementnumberfield/issues/5

Debugging:MySQL Fout (1146): Table '.symentriesdata' doesn't exist in query: UPDATE symentriesdata SET value = '115' WHERE entry_id=165 on 867 of file symphonylibtoolkitclass.mysql.php

Or in the Symphony
Symphony Fatal Database Error: 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 '' at line 1
An error occurred while attempting to execute the following query
UPDATE sym_entries_data_108 SET value = (value + 1) WHERE value >=

Anyone who can help to update this extension for 2.4 compatibility?

Fixed, thanks to Frenkel

https://github.com/frenkel/incrementnumberfield/commit/faac187d5df16e55513aa95ae027ddb55743a2d5

2.5.1 update, somewhere ?

If it runs on 2.4 it should be ok on 2.5.1 as well. Have you tried the patch above?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details